Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Depends-file usage for legacy build system #3350

Merged
merged 2 commits into from
Dec 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions cime/scripts/lib/CIME/BuildTools/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,22 @@ def _copy_depends_files(machine_name, machines_dir, output_dir, compiler):
Copy any system or compiler Depends files if they do not exist in the output directory
If there is a match for Depends.machine_name.compiler copy that and ignore the others
"""
for suffix in [machine_name, compiler, "{}.{}".format(machine_name, compiler)]:
# Note, the cmake build system does not stop if Depends.mach.compiler.cmake is found
makefiles_done = False
both = "{}.{}".format(machine_name, compiler)
for suffix in [both, machine_name, compiler]:
for extra_suffix in ["", ".cmake"]:
if extra_suffix == "" and makefiles_done:
continue

basename = "Depends.{}{}".format(suffix, extra_suffix)
dfile = os.path.join(machines_dir, basename)
outputdfile = os.path.join(output_dir, basename)
if os.path.isfile(dfile) and not os.path.exists(outputdfile):
safe_copy(dfile, outputdfile)
if os.path.isfile(dfile):
if suffix == both and extra_suffix == "":
makefiles_done = True
if not os.path.exists(outputdfile):
safe_copy(dfile, outputdfile)

class FakeCase(object):

Expand Down