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 | |
parent | 381f054a2df50028f6fb59e0173414a415134b9c (diff) | |
download | swift-1e459a94523e5cc71c21ce1a31645d174c1fabe3.zip swift-1e459a94523e5cc71c21ce1a31645d174c1fabe3.tar.bz2 |
Added 'assertions' scons flag.
-rw-r--r-- | BuildTools/SCons/SConstruct | 4 | ||||
-rw-r--r-- | SwifTools/Idle/MacOSXIdleQuerier.cpp | 1 | ||||
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.cpp | 1 |
3 files changed, 6 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" : diff --git a/SwifTools/Idle/MacOSXIdleQuerier.cpp b/SwifTools/Idle/MacOSXIdleQuerier.cpp index 64e010b..b634fcb 100644 --- a/SwifTools/Idle/MacOSXIdleQuerier.cpp +++ b/SwifTools/Idle/MacOSXIdleQuerier.cpp @@ -26,6 +26,7 @@ int MacOSXIdleQuerier::getIdleTimeSeconds() { uint64_t idle = 0; bool result = CFNumberGetValue((CFNumberRef)property, kCFNumberSInt64Type, &idle); assert(result); + (void) result; CFRelease(property); return idle / 1000000000; } diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.cpp b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.cpp index 5331964..530e066 100644 --- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.cpp +++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.cpp @@ -23,6 +23,7 @@ BonjourQuerier::BonjourQuerier(EventLoop* eventLoop) : eventLoop(eventLoop), sto int fds[2]; int result = pipe(fds); assert(result == 0); + (void) result; interruptSelectReadSocket = fds[0]; fcntl(interruptSelectReadSocket, F_SETFL, fcntl(interruptSelectReadSocket, F_GETFL)|O_NONBLOCK); interruptSelectWriteSocket = fds[1]; |