Mercurial > hg > aimc
diff carfac/SConstruct @ 639:7c3671f98280
Update build to work with older versions of gcc (4.6).
Also includes some minor cosmetic whitespace changes to the C++ source.
author | ronw@google.com |
---|---|
date | Tue, 28 May 2013 17:54:18 +0000 |
parents | efc5b1b54f63 |
children | d08c02c8e26f |
line wrap: on
line diff
--- a/carfac/SConstruct Tue May 28 16:12:07 2013 +0000 +++ b/carfac/SConstruct Tue May 28 17:54:18 2013 +0000 @@ -40,13 +40,14 @@ scons --clean """ +import commands import os carfac_sources = [ 'carfac_common.cc', 'agc_params.h', 'agc_coeffs.h', - 'agc_state.h', + 'agc_state.h', 'carfac_output.cc', 'car_params.h', 'car_coeffs.h', @@ -59,8 +60,12 @@ ] env = Environment(CPPPATH=[os.environ['EIGEN_PATH']]) -# Needed to support std::vector initialization lists. -env.MergeFlags(['-std=c++11']) +GCC_VERSION = commands.getoutput(env['CXX'] + ' -dumpversion') +if GCC_VERSION.startswith('4.6'): + env.MergeFlags(['-std=c++0x']) +else: + env.MergeFlags(['-std=c++11x']) + env.Library(target = 'carfac', source = carfac_sources) env.Command('tmp/libgtest.a', [],