From 80e538bde9d431cd13a1aba4b868de2fa169b746 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sat, 27 Nov 2010 14:14:26 +0100
Subject: Split incoming ccflags if they are a string.


diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 8e06b4c..52ea75d 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -104,7 +104,13 @@ if "cc" in env :
 	env["CC"] = env["cc"]
 if "cxx" in env :
 	env["CXX"] = env["cxx"]
-env["CCFLAGS"] = env.get("ccflags", [])
+ccflags = env.get("ccflags", [])
+if isinstance(ccflags, str) :
+	# FIXME: Make the splitting more robust
+	env["CCFLAGS"] = ccflags.split(" ")
+else :
+	env["CCFLAGS"] = ccflags
+print env["ccflags"]
 if "link" in env :
 	env["SHLINK"] = env["link"]
 	env["LINK"] = env["link"]
@@ -113,7 +119,7 @@ env["LINKFLAGS"] = env.get("linkflags", [])
 # where you need it
 env["OBJCCFLAGS"] = []
 if env["optimize"] :
-	env.Append(CCFLAGS = "-O2")
+	env.Append(CCFLAGS = ["-O2"])
 	if env["PLATFORM"] == "win32" :
 		env.Append(CCFLAGS = ["GL"])
 		env.Append(LINKFLAGS = ["/INCREMENTAL:NO", "/LTCG"])
-- 
cgit v0.10.2-6-g49f6