diff options
author | Stephen Swaney <sswaney@centurytel.net> | 2007-04-13 10:30:34 +0400 |
---|---|---|
committer | Stephen Swaney <sswaney@centurytel.net> | 2007-04-13 10:30:34 +0400 |
commit | 4e66d4e676dcb9c67acc9b1b14ae1484e75322b3 (patch) | |
tree | 548674fa46f41a066c56dd0c18f825f17f7cb369 /tools | |
parent | 26735a66708885b1f461cde9f1c03307c9d91115 (diff) |
fix mashup of CCFLAGS and CXXFLAGS for scons builds.
CXXFLAGS defaults to CCFLAGS which was causing duplicated or
extra compile flags being set for g++. Fix is to use
env.Replace() rather than .Append() the first time we
set CXXFLAGS in the build environment.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Blender.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/Blender.py b/tools/Blender.py index 87181b7dc0d..8f102d00e20 100644 --- a/tools/Blender.py +++ b/tools/Blender.py @@ -387,12 +387,18 @@ class BlenderEnvironment(SConsEnvironment): lenv.Append(CPPDEFINES=defines) if lenv['WITH_BF_GAMEENGINE']: lenv.Append(CPPDEFINES=['GAMEBLENDER=1']) + # debug or not + # CXXFLAGS defaults to CCFLAGS, therefore + # we Replace() rather than Append() to CXXFLAGS the first time if lenv['BF_DEBUG'] or (libname in quickdebug): - lenv.Append(CCFLAGS = Split(lenv['BF_DEBUG_FLAGS']), CXXFLAGS = Split(lenv['BF_DEBUG_FLAGS'])) + lenv.Append(CCFLAGS = Split(lenv['BF_DEBUG_FLAGS'])) + lenv.Replace( CXXFLAGS = Split(lenv['BF_DEBUG_FLAGS'])) else: - lenv.Append(CCFLAGS = lenv['REL_CFLAGS'], CXXFLAGS = lenv['REL_CCFLAGS']) + lenv.Append(CCFLAGS = lenv['REL_CFLAGS']) + lenv.Replace(CXXFLAGS = lenv['REL_CCFLAGS']) if lenv['BF_PROFILE']: - lenv.Append(CCFLAGS = Split(lenv['BF_PROFILE_FLAGS']), CXXFLAGS = Split(lenv['BF_PROFILE_FLAGS'])) + lenv.Append(CCFLAGS = Split(lenv['BF_PROFILE_FLAGS']), + CXXFLAGS = Split(lenv['BF_PROFILE_FLAGS'])) if compileflags: lenv.Append(CCFLAGS = compileflags) lenv.Append(CXXFLAGS = compileflags) |