if in FAST mode skip setting the SVN_REVISION as this will prompt a full recompile (todo: avoid this problem more systematically by only appending g++ flags for the exact .cpp files that need them)

This commit is contained in:
Dane Springmeyer 2010-06-08 20:41:31 +00:00
parent f5ed4305f4
commit c2c2c077aa

View file

@ -985,13 +985,18 @@ if not preconfigured:
common_cxx_flags = '-D%s ' % env['PLATFORM'].upper()
svn_version = call('svnversion')
if not svn_version == 'exported':
pattern = r'(\d+)(.*)'
try:
rev = re.match(pattern,svn_version).groups()[0]
common_cxx_flags += '-DSVN_REVISION=%s ' % rev
except: pass
if not env['FAST']:
# if we are in SCons FAST mode then make to
# to avoid unnessary re-compiles due to changing
# CFLAGS when revision number increases
svn_version = call('svnversion')
if not svn_version == 'exported':
pattern = r'(\d+)(.*)'
try:
rev = re.match(pattern,svn_version).groups()[0]
common_cxx_flags += '-DSVN_REVISION=%s ' % rev
except: pass
# Mac OSX (Darwin) special settings
if env['PLATFORM'] == 'Darwin':