Skip to content

Commit 9d43ede

Browse files
author
Xin An
committed
add sysroot template value
1 parent 2dc4707 commit 9d43ede

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

easybuild/framework/easyconfig/templates.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@
9090
# template values which are only generated dynamically
9191
TEMPLATE_NAMES_DYNAMIC = [
9292
('arch', "System architecture (e.g. x86_64, aarch64, ppc64le, ...)"),
93+
('sysroot', "Location root directory of system, prefix for standard paths like /usr/lib and /usr/include"
94+
"as specify by the --sysroot configuration option"),
9395
('mpi_cmd_prefix', "Prefix command for running MPI programs (with default number of ranks)"),
9496
('cuda_compute_capabilities', "Comma-separated list of CUDA compute capabilities, as specified via "
9597
"--cuda-compute-capabilities configuration option or via cuda_compute_capabilities easyconfig parameter"),
@@ -201,6 +203,13 @@ def template_constant_dict(config, ignore=None, skip_lower=None, toolchain=None)
201203
# set 'arch' for system architecture based on 'machine' (4th) element of platform.uname() return value
202204
template_values['arch'] = platform.uname()[4]
203205

206+
# set 'sysroot' based on sysroot build option
207+
sysroot = build_option('sysroot')
208+
if sysroot == None:
209+
template_values['sysroot'] = ""
210+
else:
211+
template_values['sysroot'] = sysroot
212+
204213
# step 1: add TEMPLATE_NAMES_EASYCONFIG
205214
for name in TEMPLATE_NAMES_EASYCONFIG:
206215
if name in ignore:

0 commit comments

Comments
 (0)