summaryrefslogtreecommitdiff
path: root/modules/remote-hip/examples/SConscript
blob: 7e99497f79641db6ac17b1b1df7021b1c6d36a83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/false

import os
import os.path
import glob


Import('env')

dir_path = Dir('.').abspath

# Environment for base library
examples_env = env.Clone();


examples_hip_env = examples_env.Clone();
examples_hip_env['CXX'] = 'hipcc';
examples_hip_env['CXXFLAGS'] += ['-O0'];

examples_env.sources = sorted(glob.glob(dir_path + "/*.cpp"))
examples_env.headers = sorted(glob.glob(dir_path + "/*.hpp"))

env.sources += examples_env.sources;
env.headers += examples_env.headers;

hip_objects = [];
#examples_hip_env.add_source_files(hip_objects, ['hip_basic_kernel.cpp'], shared=True);

#objects_static = []
examples_env.hip_info = examples_hip_env.Program('#bin/hip_device_info', ['hip_device_info.cpp', env.library_static, hip_objects]);

examples_env.hip_transfer = examples_hip_env.Program('#bin/hip_transfer_data', ['hip_transfer_data.cpp', env.library_static, hip_objects]);

# Set Alias
env.examples = [examples_env.hip_info, examples_env.hip_transfer];
env.Alias('examples', env.examples);

if env["build_examples"]:
	env.targets += ['examples'];
	env.Install('$prefix/bin/', env.examples);
#endif