summaryrefslogtreecommitdiffstats
path: root/platform/server/detect.py
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-07-03 09:16:20 +0200
committerRémi Verschelde <rverschelde@gmail.com>2019-07-03 09:59:04 +0200
commitb0d41847ed1e4cd9407dce0d26aaa09db656ec12 (patch)
tree8672de67513b1971abcb9c5fb5b0337ddcf67184 /platform/server/detect.py
parentf5f7244a2b59de60b2c1c29346b2fe5ded2ae2d0 (diff)
downloadredot-engine-b0d41847ed1e4cd9407dce0d26aaa09db656ec12.tar.gz
SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor defines
It's the recommended way to set those, and is more portable (automatically prepends -D for GCC/Clang and /D for MSVC). We still use CPPFLAGS for some pre-processor flags which are not defines.
Diffstat (limited to 'platform/server/detect.py')
-rw-r--r--platform/server/detect.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/server/detect.py b/platform/server/detect.py
index a325395d6d..2b13edee1e 100644
--- a/platform/server/detect.py
+++ b/platform/server/detect.py
@@ -66,7 +66,7 @@ def configure(env):
env.Prepend(CCFLAGS=['-O2'])
else: #optimize for size
env.Prepend(CCFLAGS=['-Os'])
- env.Prepend(CPPFLAGS=['-DDEBUG_ENABLED'])
+ env.Prepend(CPPDEFINES=['DEBUG_ENABLED'])
if (env["debug_symbols"] == "yes"):
env.Prepend(CCFLAGS=['-g1'])
@@ -75,7 +75,7 @@ def configure(env):
elif (env["target"] == "debug"):
env.Prepend(CCFLAGS=['-g3'])
- env.Prepend(CPPFLAGS=['-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
+ env.Prepend(CPPDEFINES=['DEBUG_ENABLED', 'DEBUG_MEMORY_ENABLED'])
env.Append(LINKFLAGS=['-rdynamic'])
## Architecture
@@ -95,7 +95,7 @@ def configure(env):
env["CC"] = "clang"
env["CXX"] = "clang++"
env["LINK"] = "clang++"
- env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND'])
+ env.Append(CPPDEFINES=['TYPED_METHOD_BIND'])
env.extra_suffix = ".llvm" + env.extra_suffix
@@ -216,7 +216,7 @@ def configure(env):
env.ParseConfig('pkg-config zlib --cflags --libs')
env.Prepend(CPPPATH=['#platform/server'])
- env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED'])
+ env.Append(CPPDEFINES=['SERVER_ENABLED', 'UNIX_ENABLED'])
if (platform.system() == "Darwin"):
env.Append(LINKFLAGS=['-framework', 'Cocoa', '-framework', 'Carbon', '-lz', '-framework', 'IOKit'])