Page MenuHomec4science

SConscript
No OneTemporary

File Metadata

Created
Tue, Jun 4, 21:09

SConscript

from __future__ import print_function
from os.path import join, abspath
def copyComStr(env, main):
if 'SHCXXCOMSTR' in main:
env['CXXCOMSTR'] = main['SHCXXCOMSTR']
if 'SHLINKCOMSTR' in main:
env['LINKCOMSTR'] = main['SHLINKCOMSTR']
Import('main_env')
test_env = main_env.Clone(
PRINT_CMD_LINE_FUNC=main_env['gen_print']("Copying", "red", main_env))
test_files = Split("""
run_tests.sh
test_hertz_pressure.py
test_westergaard.py
test_patch_westergaard.py
test_surface.py
test_autocorrelation.py
test_hertz_disp.py
test_hertz_kato.py
test_saturated_pressure.py
test_fftransform.py
test_bem_grid.py
test_flood_fill.py
""")
src_dir = "#/tests"
build_dir = 'build-' + main_env['build_type'] + '/tests'
for file in test_files:
source = join(src_dir, file)
test_env.Command(file, source, Copy("$TARGET", "$SOURCE"))
# Do not use criterion for this one (benchmark for SCITAS)
bare_env = main_env.Clone()
copyComStr(bare_env, main_env)
bare_env.AppendUnique(LIBS="Tamaas")
bare_env.Program("test_rough_surface.cpp")
if main_env['use_criterion']:
crit_env = main_env.Clone(tools=[criterion])
copyComStr(crit_env, main_env)
crit_env.AppendUnique(LIBS=['Tamaas'],
LIBPATH=[abspath('build-' + main_env['build_type'] + '/src')])
cpp_test_files = Split("""
test_grid.cpp
test_loop.cpp
test_fft.cpp
test_model.cpp
""")
for file in cpp_test_files:
crit_env.Program(file)

Event Timeline