diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-05-25 19:54:02 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-05-25 19:54:02 (GMT) |
commit | 1e459a94523e5cc71c21ce1a31645d174c1fabe3 (patch) | |
tree | 8b237e01414bc4952769caf6bb3bd264646a7e0a /BuildTools/SCons | |
parent | 381f054a2df50028f6fb59e0173414a415134b9c (diff) | |
download | swift-contrib-1e459a94523e5cc71c21ce1a31645d174c1fabe3.zip swift-contrib-1e459a94523e5cc71c21ce1a31645d174c1fabe3.tar.bz2 |
Added 'assertions' scons flag.
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r-- | BuildTools/SCons/SConstruct | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index 284c032..6914880 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -19,6 +19,7 @@ vars.Add(EnumVariable("test", "Compile and run tests", "none", ["none", "all", " vars.Add(BoolVariable("optimize", "Compile with optimizations turned on", "no")) vars.Add(BoolVariable("debug", "Compile with debug information", "yes")) vars.Add(BoolVariable("allow_warnings", "Allow compilation warnings during compilation", "yes")) +vars.Add(BoolVariable("assertions", "Compile with assertions", "yes")) vars.Add(BoolVariable("max_jobs", "Build with maximum number of parallel jobs", "no")) vars.Add(EnumVariable("target", "Choose a target platform for compilation", "native", ["native", "iphone-simulator", "iphone-device", "xcode"])) vars.Add(BoolVariable("swift_mobile", "Build mobile Swift", "no")) @@ -167,6 +168,9 @@ if env.get("mac105", 0) : "-arch", "i386"]) env.Append(FRAMEWORKS = ["Security"]) +if not env["assertions"] : + env.Append(CPPDEFINES = ["NDEBUG"]) + # If we build shared libs on AMD64, we need -fPIC. # This should have no performance impact om AMD64 if env["PLATFORM"] == "posix" and platform.machine() == "x86_64" : |