mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-04-10 05:42:37 +02:00
Don't use undefined variables.
This commit is contained in:
parent
561f230daf
commit
7316ac8bd0
57
SConstruct
57
SConstruct
@ -200,29 +200,6 @@ opts.Add("LINKFLAGS", "Custom flags for the linker")
|
|||||||
# in following code (especially platform and custom_modules).
|
# in following code (especially platform and custom_modules).
|
||||||
opts.Update(env_base)
|
opts.Update(env_base)
|
||||||
|
|
||||||
if env_base["use_rtti"]:
|
|
||||||
if not env.msvc:
|
|
||||||
env_base.Append(CXXFLAGS=["-frtti"])
|
|
||||||
else:
|
|
||||||
env_base.Append(CXXFLAGS=["/GR"])
|
|
||||||
else:
|
|
||||||
if not env.msvc:
|
|
||||||
env_base.Append(CXXFLAGS=["-fno-rtti"])
|
|
||||||
else:
|
|
||||||
env_base.Append(CXXFLAGS=["/GR-"])
|
|
||||||
|
|
||||||
# Don't use dynamic_cast, necessary with no-rtti.
|
|
||||||
env_base.Append(CPPDEFINES=["NO_SAFE_CAST"])
|
|
||||||
|
|
||||||
if not env_base["use_exceptions"]:
|
|
||||||
if not env.msvc:
|
|
||||||
env_base.Append(CXXFLAGS=["-fno-exceptions"])
|
|
||||||
else:
|
|
||||||
env_base.Append(CXXFLAGS=["/EHa-"])
|
|
||||||
env_base.Append(CXXFLAGS=["/EHs-"])
|
|
||||||
env_base.Append(CXXFLAGS=["/EHc-"])
|
|
||||||
env_base.Append(CXXFLAGS=["/EHr-"])
|
|
||||||
|
|
||||||
# Platform selection: validate input, and add options.
|
# Platform selection: validate input, and add options.
|
||||||
|
|
||||||
selected_platform = ""
|
selected_platform = ""
|
||||||
@ -467,6 +444,40 @@ if selected_platform in platform_list:
|
|||||||
# We apply it to CCFLAGS (both C and C++ code) in case it impacts C features.
|
# We apply it to CCFLAGS (both C and C++ code) in case it impacts C features.
|
||||||
env.Prepend(CCFLAGS=["/std:c++14"])
|
env.Prepend(CCFLAGS=["/std:c++14"])
|
||||||
|
|
||||||
|
if env_base["use_rtti"]:
|
||||||
|
if not env.msvc:
|
||||||
|
env_base.Prepend(CXXFLAGS=["-frtti"])
|
||||||
|
env.Prepend(CXXFLAGS=["-frtti"])
|
||||||
|
else:
|
||||||
|
env_base.Prepend(CXXFLAGS=["/GR"])
|
||||||
|
env.Prepend(CXXFLAGS=["/GR"])
|
||||||
|
else:
|
||||||
|
if not env.msvc:
|
||||||
|
env_base.Prepend(CXXFLAGS=["-fno-rtti"])
|
||||||
|
env.Prepend(CXXFLAGS=["-fno-rtti"])
|
||||||
|
else:
|
||||||
|
env_base.Prepend(CXXFLAGS=["/GR-"])
|
||||||
|
env.Prepend(CXXFLAGS=["/GR-"])
|
||||||
|
|
||||||
|
# Don't use dynamic_cast, necessary with no-rtti.
|
||||||
|
env_base.Prepend(CPPDEFINES=["NO_SAFE_CAST"])
|
||||||
|
env.Prepend(CPPDEFINES=["NO_SAFE_CAST"])
|
||||||
|
|
||||||
|
if not env_base["use_exceptions"]:
|
||||||
|
if not env.msvc:
|
||||||
|
env_base.Prepend(CXXFLAGS=["-fno-exceptions"])
|
||||||
|
env.Prepend(CXXFLAGS=["-fno-exceptions"])
|
||||||
|
else:
|
||||||
|
env_base.Prepend(CXXFLAGS=["/EHa-"])
|
||||||
|
env_base.Prepend(CXXFLAGS=["/EHs-"])
|
||||||
|
env_base.Prepend(CXXFLAGS=["/EHc-"])
|
||||||
|
env_base.Prepend(CXXFLAGS=["/EHr-"])
|
||||||
|
|
||||||
|
env.Prepend(CXXFLAGS=["/EHa-"])
|
||||||
|
env.Prepend(CXXFLAGS=["/EHs-"])
|
||||||
|
env.Prepend(CXXFLAGS=["/EHc-"])
|
||||||
|
env.Prepend(CXXFLAGS=["/EHr-"])
|
||||||
|
|
||||||
# Handle renamed options.
|
# Handle renamed options.
|
||||||
if "use_lto" in ARGUMENTS or "use_thinlto" in ARGUMENTS:
|
if "use_lto" in ARGUMENTS or "use_thinlto" in ARGUMENTS:
|
||||||
print("Error: The `use_lto` and `use_thinlto` boolean options have been unified to `lto=<none|thin|full>`.")
|
print("Error: The `use_lto` and `use_thinlto` boolean options have been unified to `lto=<none|thin|full>`.")
|
||||||
|
Loading…
Reference in New Issue
Block a user