#!/bin/false import os import os.path import glob Import('env') dir_path = Dir('.').abspath # Environment for base library benchmarks_env = env.Clone(); benchmarks_sycl_env = benchmarks_env.Clone(); benchmarks_sycl_env['CXX'] = 'acpp'; benchmarks_sycl_env['CXXFLAGS'] += ['-O2']; benchmarks_env.sources = sorted(glob.glob(dir_path + "/*.cpp")) benchmarks_env.headers = sorted(glob.glob(dir_path + "/*.hpp")) env.sources += benchmarks_env.sources; env.headers += benchmarks_env.headers; sycl_objects = []; benchmarks_sycl_env.add_source_files(sycl_objects, ['kernel_mixed_precision.cpp'], shared=True); objects_static = [] benchmarks_env.sycl_basic = benchmarks_env.Program('#bin/benchmark_mixed_precision', ['mixed_precision.cpp', env.library_static, sycl_objects]); # Set Alias env.benchmarks = [benchmarks_env.sycl_basic]; env.Alias('benchmarks', env.benchmarks); if env["build_benchmarks"]: env.targets += ['benchmarks']; env.Install('$prefix/bin/', env.benchmarks); #endif