summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-10-15 08:39:29 +0200
committerRémi Verschelde <rverschelde@gmail.com>2021-10-15 10:26:58 +0200
commitcd21cc683a565a775b31aad4bd1e61d6c791d5ed (patch)
tree3a73e14679e165bfcbbb3415dfe65fcff9232f69 /SConstruct
parente2bfb27efb858c4a1314d314386531cbcdfcf335 (diff)
SCons: Set `DEBUG_ENABLED` and `DEV_ENABLED` in SConstruct
They're the same for all platforms so they don't need to be repeated in all platform definitions.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct14
1 files changed, 11 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct
index ed57a66cb7..83c89be5f9 100644
--- a/SConstruct
+++ b/SConstruct
@@ -308,11 +308,19 @@ env_base.Prepend(CPPPATH=["#"])
env_base.platform_exporters = platform_exporters
env_base.platform_apis = platform_apis
-if env_base["use_precise_math_checks"]:
- env_base.Append(CPPDEFINES=["PRECISE_MATH_CHECKS"])
+# Build type defines - more platform-specific ones can be in detect.py.
+if env_base["target"] == "release_debug" or env_base["target"] == "debug":
+ # DEBUG_ENABLED enables debugging *features* and debug-only code, which is intended
+ # to give *users* extra debugging information for their game development.
+ env_base.Append(CPPDEFINES=["DEBUG_ENABLED"])
if env_base["target"] == "debug":
- env_base.Append(CPPDEFINES=["DEBUG_MEMORY_ALLOC", "DISABLE_FORCED_INLINE"])
+ # DEV_ENABLED enables *engine developer* code which should only be compiled for those
+ # working on the engine itself.
+ env_base.Append(CPPDEFINES=["DEV_ENABLED"])
+
+if env_base["use_precise_math_checks"]:
+ env_base.Append(CPPDEFINES=["PRECISE_MATH_CHECKS"])
if env_base["no_editor_splash"]:
env_base.Append(CPPDEFINES=["NO_EDITOR_SPLASH"])