summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-04-15 20:55:28 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-04-15 20:56:20 (GMT)
commit0f8fa2b135fb23076985e4f2289c29f5ef51e150 (patch)
tree5de0a9d2527f0a6f1fb5ee24fdb849f97c7951f3 /BuildTools/SCons
parent42e8d45830ce99f461d171f1fc6202f89bd81a89 (diff)
downloadswift-0f8fa2b135fb23076985e4f2289c29f5ef51e150.zip
swift-0f8fa2b135fb23076985e4f2289c29f5ef51e150.tar.bz2
Warn on suspicious logical operations with GCC>=4.5.
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r--BuildTools/SCons/SConstruct4
1 files changed, 3 insertions, 1 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 5d6e6be..5f4a984 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -33,7 +33,7 @@ vars.Add(PathVariable("qt", "Qt location", "", PathVariable.PathAccept))
# Set up default build & configure environment
################################################################################
-env = Environment(CPPPATH = "#", ENV = {'PATH' : os.environ['PATH']}, variables = vars)
+env = Environment(CPPPATH = "#", ENV = {'PATH' : os.environ['PATH'], 'LD_LIBRARY_PATH' : os.environ["LD_LIBRARY_PATH"]}, variables = vars)
Help(vars.GenerateHelpText(env))
@@ -100,6 +100,8 @@ if env["warnings"] :
else :
env.Append(CCFLAGS = ["-W", "-Wall"])
#env.Append(CCFLAGS = ["-W", "-Wall", "-Wredundant-decls", "-pedantic", "-Wno-long-long", "-Woverloaded-virtual", "-Wundef", "-Wfloat-equal", "-Wold-style-cast"])
+ if env["CCVERSION"].split(".")[0] > 4 or onv["CCVERSION"].split(".")[1] >= 5 :
+ env.Append(CCFLAGS = ["-Wlogical-op"])
if env.get("coverage", 0) :
assert(env["PLATFORM"] != "win32")