[Test] Build tests with optimization disabled
Compiling the tests takes longer than running them, so it actually saves time to compile the tests with optimizations disabled.
This commit is contained in:
parent
b0085eb58e
commit
4544fd3392
2 changed files with 14 additions and 0 deletions
|
|
@ -10,6 +10,13 @@ localenv.Prepend(CPPPATH=['#ext/gtest/include', '#include'],
|
|||
localenv.Append(LIBS=['gtest'] + localenv['cantera_libs'],
|
||||
CCFLAGS=env['warning_flags'])
|
||||
|
||||
# Turn of optimization to speed up compilation
|
||||
ccflags = localenv['CCFLAGS']
|
||||
for optimize_flag in ('-O3', '-O2', '/O2'):
|
||||
if optimize_flag in ccflags:
|
||||
ccflags.remove(optimize_flag)
|
||||
localenv['CCFLAGS'] = ccflags
|
||||
|
||||
localenv['ENV']['CANTERA_DATA'] = Dir('#build/data').abspath
|
||||
|
||||
PASSED_FILES = {}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,13 @@ localenv = env.Clone()
|
|||
localenv.Prepend(CPPPATH=['#include', '#src', 'shared'])
|
||||
localenv.Append(CCFLAGS=env['warning_flags'])
|
||||
|
||||
# Turn of optimization to speed up compilation
|
||||
ccflags = localenv['CCFLAGS']
|
||||
for optimize_flag in ('-O3', '-O2', '/O2'):
|
||||
if optimize_flag in ccflags:
|
||||
ccflags.remove(optimize_flag)
|
||||
localenv['CCFLAGS'] = ccflags
|
||||
|
||||
if localenv['python_package'] in ('full', 'minimal'):
|
||||
localenv['ENV']['PYTHONPATH'] = localenv['pythonpath_build2']
|
||||
localenv['ENV']['PYTHON_CMD'] = localenv.subst('$python_cmd')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue