From f5f7dcf14732d6075b89a5638f9d72f10b8d35c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sun, 30 Dec 2012 19:35:46 +0100
Subject: Rearrange warning options.

Change-Id: Ibe78f592cc9278e149541ad3e9499bd1fb198671

diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index e4071be..d218d9a 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -215,13 +215,7 @@ if env["PLATFORM"] == "win32" :
 	#env.Append(CCFLAGS = ["/Wall"])
 	pass
 else :
-	env.Append(CXXFLAGS = ["-Wextra", "-Wall", "-Wnon-virtual-dtor", "-Wundef", "-Wold-style-cast", "-Wno-long-long", "-Woverloaded-virtual", "-Wfloat-equal", "-Wredundant-decls"])
-	if not env.get("allow_warnings", False) :
-		env.Append(CXXFLAGS = ["-Werror"])
-	gccVersion = env.get("CCVERSION", "0.0.0").split(".")
-	if gccVersion >= ["4", "5", "0"] and not "clang" in env["CC"] :
-		env.Append(CXXFLAGS = ["-Wlogical-op"])
-	if "clang" in env["CC"] :
+	if "clang" in env["CXX"] :
 		env.Append(CXXFLAGS = [
 			"-Weverything",
 			"-Wno-sign-conversion", # We have this a lot. Not sure if we should allow this or not.
@@ -232,6 +226,13 @@ else :
 			"-Wno-global-constructors",
 			"-Wno-padded",
 			])
+	else :
+		env.Append(CXXFLAGS = ["-Wextra", "-Wall", "-Wnon-virtual-dtor", "-Wundef", "-Wold-style-cast", "-Wno-long-long", "-Woverloaded-virtual", "-Wfloat-equal", "-Wredundant-decls", "-Wno-unknown-pragmas"])
+		gccVersion = env.get("CCVERSION", "0.0.0").split(".")
+		if gccVersion >= ["4", "5", "0"] and not "clang" in env["CC"] :
+			env.Append(CXXFLAGS = ["-Wlogical-op"])
+	if not env.get("allow_warnings", False) :
+		env.Append(CXXFLAGS = ["-Werror"])
 
 if env.get("coverage", 0) :
 	assert(env["PLATFORM"] != "win32")
-- 
cgit v0.10.2-6-g49f6