From 0f8fa2b135fb23076985e4f2289c29f5ef51e150 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Thu, 15 Apr 2010 22:55:28 +0200
Subject: Warn on suspicious logical operations with GCC>=4.5.


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")
-- 
cgit v0.10.2-6-g49f6