2013-12-30 23:50:56 +01:00
|
|
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
2009-08-30 09:46:56 +02:00
|
|
|
import os
|
|
|
|
|
2020-08-16 06:25:25 +02:00
|
|
|
for cxx in builder.targets:
|
|
|
|
binary = SM.Library(builder, cxx, 'sourcemod.logic')
|
2018-10-04 19:59:40 +02:00
|
|
|
binary.compiler.cxxincludes += [
|
|
|
|
builder.sourcePath,
|
|
|
|
os.path.join(builder.sourcePath, 'core', 'logic'),
|
|
|
|
os.path.join(builder.sourcePath, 'public'),
|
|
|
|
os.path.join(builder.sourcePath, 'sourcepawn', 'include'),
|
|
|
|
os.path.join(builder.sourcePath, 'public', 'amtl', 'amtl'),
|
|
|
|
os.path.join(builder.sourcePath, 'public', 'amtl'),
|
|
|
|
os.path.join(SM.mms_root, 'core', 'sourcehook')
|
|
|
|
]
|
|
|
|
binary.compiler.defines += [
|
|
|
|
'SM_DEFAULT_THREADER',
|
|
|
|
'SM_LOGIC'
|
|
|
|
]
|
|
|
|
|
2020-08-16 06:25:25 +02:00
|
|
|
if binary.compiler.target.platform == 'linux':
|
2018-10-04 19:59:40 +02:00
|
|
|
binary.compiler.postlink += ['-lpthread', '-lrt']
|
2020-08-16 06:25:25 +02:00
|
|
|
elif binary.compiler.target.platform == 'mac':
|
2018-10-04 19:59:40 +02:00
|
|
|
binary.compiler.cflags += ['-Wno-deprecated-declarations']
|
|
|
|
binary.compiler.postlink += ['-framework', 'CoreServices']
|
2014-09-12 02:15:59 +02:00
|
|
|
|
2018-10-04 19:59:40 +02:00
|
|
|
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
|
|
|
binary.compiler.cxxflags += ['-fno-rtti']
|
|
|
|
elif binary.compiler.family == 'msvc':
|
|
|
|
binary.compiler.cxxflags += ['/GR-']
|
2014-09-12 02:15:59 +02:00
|
|
|
|
2018-10-04 19:59:40 +02:00
|
|
|
binary.sources += [
|
|
|
|
'common_logic.cpp',
|
|
|
|
'smn_adt_array.cpp',
|
|
|
|
'smn_sorting.cpp',
|
|
|
|
'smn_maplists.cpp',
|
|
|
|
'ADTFactory.cpp',
|
|
|
|
'smn_adt_stack.cpp',
|
Pare down ThreadSupport and remove ancient thread code.
This patch removes almost all of the existing platform-specific
ThreadSupport code, as well as code derived from it. It is now
implemented on top of C++11 threads and is much simpler.
This is the first inclusion of STL in SourceMod. Mac and Windows are
allowed to dynamically link to their respective implementations. On
Linux, libstdc++ is statically linked, except in the cases where it was
already dynamically linked (csgo, blade).
IEventSignal has been retained because sourcemod-curl-extension relies
on it. As written, it is impossible to use as a condition variable,
because the caller does not have access to the underlying mutex. There
is no way to make this API safe or non-racy, so extensions relying on
it should switch to C++11 threads.
ThreadWorker is now pared down and does not interact or inherit from
BaseWorker in any way. Basic functionality has been tested. Since it is
not used anywhere in SourceMod, or seemingly in any repository on
GitHub, it's unclear whether it should even exist. But it has been
tested in this patch.
This change bumps the minimum macOS version to OS X 10.7, and the
minimum C++ standard level to C++14.
2020-05-13 00:40:39 +02:00
|
|
|
'BaseWorker.cpp',
|
2018-10-04 19:59:40 +02:00
|
|
|
'ThreadSupport.cpp',
|
|
|
|
'smn_float.cpp',
|
|
|
|
'TextParsers.cpp',
|
|
|
|
'smn_textparse.cpp',
|
|
|
|
'smn_adt_trie.cpp',
|
|
|
|
'smn_functions.cpp',
|
|
|
|
'smn_timers.cpp',
|
|
|
|
'smn_players.cpp',
|
|
|
|
'MemoryUtils.cpp',
|
|
|
|
'smn_admin.cpp',
|
|
|
|
'smn_banning.cpp',
|
|
|
|
'smn_filesystem.cpp',
|
|
|
|
'stringutil.cpp',
|
|
|
|
'Translator.cpp',
|
|
|
|
'PhraseCollection.cpp',
|
|
|
|
'smn_lang.cpp',
|
|
|
|
'smn_string.cpp',
|
|
|
|
'smn_handles.cpp',
|
|
|
|
'smn_datapacks.cpp',
|
|
|
|
'smn_gameconfigs.cpp',
|
|
|
|
'smn_fakenatives.cpp',
|
|
|
|
'GameConfigs.cpp',
|
|
|
|
'sm_crc32.cpp',
|
|
|
|
'smn_profiler.cpp',
|
|
|
|
'ShareSys.cpp',
|
|
|
|
'PluginSys.cpp',
|
|
|
|
'HandleSys.cpp',
|
|
|
|
'NativeOwner.cpp',
|
|
|
|
'ExtensionSys.cpp',
|
|
|
|
'DebugReporter.cpp',
|
|
|
|
'Database.cpp',
|
|
|
|
'smn_database.cpp',
|
|
|
|
'ForwardSys.cpp',
|
|
|
|
'AdminCache.cpp',
|
|
|
|
'sm_trie.cpp',
|
|
|
|
'smn_console.cpp',
|
|
|
|
'ProfileTools.cpp',
|
|
|
|
'Logger.cpp',
|
|
|
|
'smn_core.cpp',
|
|
|
|
'smn_menus.cpp',
|
|
|
|
'sprintf.cpp',
|
|
|
|
'LibrarySys.cpp',
|
|
|
|
'RootConsoleMenu.cpp',
|
|
|
|
'CDataPack.cpp',
|
|
|
|
'frame_tasks.cpp',
|
|
|
|
'smn_halflife.cpp',
|
|
|
|
'FrameIterator.cpp',
|
|
|
|
'DatabaseConfBuilder.cpp',
|
|
|
|
]
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2020-08-16 06:25:25 +02:00
|
|
|
if binary.compiler.target.arch == 'x86_64':
|
2018-10-04 19:59:40 +02:00
|
|
|
binary.sources += ['PseudoAddrManager.cpp']
|
2017-12-20 08:56:23 +01:00
|
|
|
|
2018-10-04 19:59:40 +02:00
|
|
|
SM.binaries += [builder.Add(binary)]
|