From 2a7f588612802f3f5e6cceb674f919beecd33eea Mon Sep 17 00:00:00 2001 From: Scott McMillan Date: Thu, 8 Apr 2021 03:55:32 -0500 Subject: [PATCH] kim-api: support the NVIDIA compiler (#22857) Co-authored-by: Scott McMillan --- var/spack/repos/builtin/packages/kim-api/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/kim-api/package.py b/var/spack/repos/builtin/packages/kim-api/package.py index 566c7acbb1d..4d437a9c47e 100644 --- a/var/spack/repos/builtin/packages/kim-api/package.py +++ b/var/spack/repos/builtin/packages/kim-api/package.py @@ -39,3 +39,9 @@ class KimApi(CMakePackage): # The Fujitsu compiler requires the '--linkfortran' # option to combine C++ and Fortran programs. patch('fujitsu_add_link_flags.patch', when='%fj') + + def patch(self): + # Remove flags not recognized by the NVIDIA compiler + if self.spec.satisfies('%nvhpc'): + filter_file('-std=gnu', '', + 'examples/simulators/simulator-model-example/CMakeLists.txt')