-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathSConstruct
More file actions
21 lines (15 loc) · 727 Bytes
/
Copy pathSConstruct
File metadata and controls
21 lines (15 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import os
scons_vars = Variables(args=ARGUMENTS);
scons_vars.Add(EnumVariable('mode', 'Compiler Optimization Mode', 'opt',
allowed_values=('debug', 'opt', 'release')))
scons_vars.Add(BoolVariable('verbose', 'Compiler Optimization Mode', False))
env = Environment(ROOT_PATH = os.getcwd(), variables = scons_vars);
if (not env["verbose"]):
env['CXXCOMSTR'] = 'Compiling [$SOURCES] > $TARGET'
env['LINKCOMSTR'] = 'Linking [...] > $TARGET'
unknown_vars = scons_vars.UnknownVariables()
if unknown_vars:
raise Exception('UnknownVariables: ' + str(unknown_vars))
env["build_dir"] = "build-" + env["mode"];
Export('env');
SConscript('SConscript', variant_dir=env["build_dir"], duplicate=0)