summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkelling <j.kelling@hzdr.de>2021-01-06 10:51:05 +0100
committerGitHub <noreply@github.com>2021-01-06 10:51:05 +0100
commit8956c8c7b71b09e5bc6432b157bb4ca9a5d6004f (patch)
tree480eb82edaa23482df3c9832b56cdc7187618937
parent8860db402163ed2eed8db7cfeab4844a9436989a (diff)
downloadspack-8956c8c7b71b09e5bc6432b157bb4ca9a5d6004f.tar.gz
spack-8956c8c7b71b09e5bc6432b157bb4ca9a5d6004f.tar.bz2
spack-8956c8c7b71b09e5bc6432b157bb4ca9a5d6004f.tar.xz
spack-8956c8c7b71b09e5bc6432b157bb4ca9a5d6004f.zip
magma: remove -W args from CMakeLists.txt when using nvhpc (#20516)
-rw-r--r--var/spack/repos/builtin/packages/magma/cmake-W.patch12
-rw-r--r--var/spack/repos/builtin/packages/magma/package.py1
2 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/magma/cmake-W.patch b/var/spack/repos/builtin/packages/magma/cmake-W.patch
new file mode 100644
index 0000000000..5917967632
--- /dev/null
+++ b/var/spack/repos/builtin/packages/magma/cmake-W.patch
@@ -0,0 +1,12 @@
+diff -ru magma-2.5.0-orig/CMakeLists.txt magma-2.5.0/CMakeLists.txt
+--- magma-2.5.0-orig/CMakeLists.txt 2019-01-02 11:18:39.000000000 -0800
++++ magma-2.5.0/CMakeLists.txt 2019-04-03 15:58:01.871234891 -0700
+@@ -363,8 +363,6 @@
+ else()
+ # Primarily for gcc / nvcc:
+ # Ignore unused static functions in headers.
+- set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unused-function" )
+- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-function" )
+ endif()
+
+ if (CMAKE_HOST_APPLE)
diff --git a/var/spack/repos/builtin/packages/magma/package.py b/var/spack/repos/builtin/packages/magma/package.py
index 9fff7bb9b9..345fca76e4 100644
--- a/var/spack/repos/builtin/packages/magma/package.py
+++ b/var/spack/repos/builtin/packages/magma/package.py
@@ -52,6 +52,7 @@ class Magma(CMakePackage, CudaPackage):
patch('magma-2.3.0-gcc-4.8.patch', when='@2.3.0%gcc@:4.8')
patch('magma-2.5.0.patch', when='@2.5.0')
patch('magma-2.5.0-cmake.patch', when='@2.5.0')
+ patch('cmake-W.patch', when='@2.5.0:%nvhpc')
def cmake_args(self):
spec = self.spec