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:
parent
f5ed4305f4
commit
c2c2c077aa
1 changed files with 12 additions and 7 deletions
19
SConstruct
19
SConstruct
|
@ -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':
|
||||
|
|
Loading…
Reference in a new issue