Skip to content

Commit 87e93e1

Browse files
committed
Honor user-defined configopts in LLVM easyblock
1 parent 5bf4ceb commit 87e93e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

easybuild/easyblocks/l/llvm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,10 @@ def add_cmake_opts(self):
10321032
"""Add LLVM-specific CMake options."""
10331033
base_opts = self._cfgopts.copy()
10341034
for k, v in self._cmakeopts.items():
1035-
base_opts.append('-D%s=%s' % (k, v))
1035+
opt_start = f'-D{k}='
1036+
# Don't overwrite e.g. user settings
1037+
if not any(opt.startswith(opt_start) for opt in base_opts):
1038+
base_opts.append(f'-D{k}={v}')
10361039
self.cfg['configopts'] = ' '.join(base_opts)
10371040

10381041
def configure_step2(self):

0 commit comments

Comments
 (0)