diff --git a/SConstruct b/SConstruct index 80025d69d..791bbab24 100644 --- a/SConstruct +++ b/SConstruct @@ -811,6 +811,7 @@ env['HAS_TIMES_H'] = conf.CheckCHeader('sys/times.h', '""') env['HAS_UNISTD_H'] = conf.CheckCHeader('unistd.h', '""') env['HAS_MATH_H_ERF'] = conf.CheckDeclaration('erf', '#include ', 'C++') env['HAS_BOOST_MATH'] = conf.CheckCXXHeader('boost/math/special_functions/erf.hpp', '<>') +env['HAS_TR1_TUPLE'] = conf.CheckCXXHeader('tr1/tuple', '<>') boost_version_source = get_expression_value([''], 'BOOST_LIB_VERSION') retcode, boost_lib_version = conf.TryRun(boost_version_source, '.cpp') env['BOOST_LIB_VERSION'] = boost_lib_version.strip() diff --git a/ext/SConscript b/ext/SConscript index 45916f9d7..9e9be3d30 100644 --- a/ext/SConscript +++ b/ext/SConscript @@ -159,6 +159,8 @@ localenv = env.Clone() localenv.Prepend(CPPPATH=[Dir('#ext/gtest'), Dir('#ext/gtest/include')], CPPDEFINES={'GTEST_HAS_PTHREAD': 0}) +if not localenv['HAS_TR1_TUPLE']: + localenv.Append(CPPDEFINES='GTEST_USE_OWN_TR1_TUPLE') gtest = build(localenv.Library(pjoin('../lib', 'gtest'), source=['gtest/src/gtest-all.cc'])) diff --git a/test/SConscript b/test/SConscript index 99725525f..fc7a7ebd1 100644 --- a/test/SConscript +++ b/test/SConscript @@ -9,6 +9,9 @@ localenv.Prepend(CPPPATH=['#ext/gtest/include', '#include'], localenv.Append(LIBS=['gtest'] + localenv['cantera_libs'], CCFLAGS=env['warning_flags']) +if not localenv['HAS_TR1_TUPLE']: + localenv.Append(CPPDEFINES='GTEST_USE_OWN_TR1_TUPLE') + localenv['ENV']['CANTERA_DATA'] = Dir('#build/data').abspath PASSED_FILES = {}