Skip to content

Commit

Permalink
exclude c++ std test for old versions
Browse files Browse the repository at this point in the history
Co-authored-by: Mikael Öhman <micketeer@gmail.com>
  • Loading branch information
jfgrimm and Micket authored Apr 2, 2024
1 parent cba7365 commit a51d78b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions easybuild/easyblocks/n/nvhpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,14 @@ def sanity_check_step(self):

custom_commands = ["%s -v" % compiler for compiler in compiler_names]

# compile minimal example using -std=c++20 to catch issue where it picks up the wrong GCC
# (as long as system gcc is < 9.0)
# see: https://github.com/easybuilders/easybuild-easyblocks/pull/3240
tmpdir = tempfile.mkdtemp()
write_file(os.path.join(tmpdir, 'minimal.cpp'), NVHPC_MINIMAL_EXAMPLE)
minimal_compiler_cmd = "cd %s && nvc++ -std=c++20 minimal.cpp -o minimal" % tmpdir
custom_commands.append(minimal_compiler_cmd)
if LooseVersion(self.version) >= LooseVersion('21'):
# compile minimal example using -std=c++20 to catch issue where it picks up the wrong GCC
# (as long as system gcc is < 9.0)
# see: https://github.com/easybuilders/easybuild-easyblocks/pull/3240
tmpdir = tempfile.mkdtemp()
write_file(os.path.join(tmpdir, 'minimal.cpp'), NVHPC_MINIMAL_EXAMPLE)
minimal_compiler_cmd = "cd %s && nvc++ -std=c++20 minimal.cpp -o minimal" % tmpdir
custom_commands.append(minimal_compiler_cmd)

super(EB_NVHPC, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands)

Expand Down

0 comments on commit a51d78b

Please sign in to comment.