Skip to content

Commit

Permalink
Merge pull request #2331 from ComputeCanada/fix_openfoam_hardcoded_cpp
Browse files Browse the repository at this point in the history
added regex to replace /lib/cpp with cpp in OpenFOAM's wmake rules file
  • Loading branch information
akesandgren authored Feb 14, 2022
2 parents 2ce3800 + 853c88a commit 957b6ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions easybuild/easyblocks/o/openfoam.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ def configure_step(self):
# that would change the cOPT/c++OPT values from their empty setting.
suffixes = ['', 'Opt']
wmake_rules_files = [os.path.join(ldir, lang + suff) for ldir in ldirs for lang in langs for suff in suffixes]
wmake_rules_files += [os.path.join(ldir, "general") for ldir in ldirs]

mpicc = os.environ['MPICC']
mpicxx = os.environ['MPICXX']
Expand Down Expand Up @@ -228,6 +229,8 @@ def configure_step(self):
regex_subs = []
for comp_var, newval in comp_vars.items():
regex_subs.append((r"^(%s\s*=\s*).*$" % re.escape(comp_var), r"\1%s" % newval))
# replace /lib/cpp by cpp, but keep the arguments
regex_subs.append((r"^(CPP\s*=\s*)/lib/cpp(.*)$", r"\1cpp\2"))
apply_regex_substitutions(fullpath, regex_subs)

# enable verbose build for debug purposes
Expand Down

0 comments on commit 957b6ba

Please sign in to comment.