From c754f5bf313f6c6db02703ca5bd9eb5c679f66d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Tue, 15 Feb 2011 16:55:57 +0100
Subject: Fixed optimize compilation flags on Windows.


diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 5952629..1388615 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -123,10 +123,11 @@ env["LINKFLAGS"] = env.get("linkflags", [])
 # where you need it
 env["OBJCCFLAGS"] = []
 if env["optimize"] :
-	env.Append(CCFLAGS = ["-O2"])
 	if env["PLATFORM"] == "win32" :
-		env.Append(CCFLAGS = ["GL"])
+		env.Append(CCFLAGS = ["/O2", "/GL"])
 		env.Append(LINKFLAGS = ["/INCREMENTAL:NO", "/LTCG"])
+	else :
+		env.Append(CCFLAGS = ["-O2"])
 
 if env["debug"] :
 	if env["PLATFORM"] == "win32" :
@@ -336,7 +337,12 @@ boost_flags = {}
 if env.get("boost_libdir", None) :
 	boost_flags["LIBPATH"] = [env["boost_libdir"]]
 if env.get("boost_includedir", None) :
-	boost_flags["CPPPATH"] = [env["boost_includedir"]]
+	if env["PLATFORM"] == "win32" :
+		boost_flags["CPPPATH"] = [env["boost_includedir"]]
+	else :
+		# Using isystem to avoid getting warnings from a system boost
+		# Unfortunately, this also disables dependency tracking
+		boost_flags["CPPFLAGS"] = [("-isystem", env["boost_includedir"])]
 boost_conf_env.MergeFlags(boost_flags)
 conf = Configure(boost_conf_env)
 boostLibs = [("signals", None), ("thread", None), ("regex", None), ("program_options", None), ("filesystem", None), ("system", "system/system_error.hpp"), ("date_time", "date_time/date.hpp")]
-- 
cgit v0.10.2-6-g49f6