summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreugeneswalker <38933153+eugeneswalker@users.noreply.github.com>2021-03-01 14:54:14 -0800
committerGitHub <noreply@github.com>2021-03-01 14:54:14 -0800
commit36ae5ac6ef902b608a2f3c4857094790d3ec4186 (patch)
treea9861f6ae31270bb4304eaaa38aeb07ddb54881a
parentd7595d6703e89b2655874522eedf0a8502d85266 (diff)
downloadspack-36ae5ac6ef902b608a2f3c4857094790d3ec4186.tar.gz
spack-36ae5ac6ef902b608a2f3c4857094790d3ec4186.tar.bz2
spack-36ae5ac6ef902b608a2f3c4857094790d3ec4186.tar.xz
spack-36ae5ac6ef902b608a2f3c4857094790d3ec4186.zip
kokkos package: +cuda requires +wrapper when compiler is not clang (#21941)
This check is performed in cmake_args rather than with a 'conflicts' statement because matching on !clang (i.e. any compiler that is not clang) cannot currently be done with our spec syntax.
-rw-r--r--var/spack/repos/builtin/packages/kokkos/package.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py
index 22fa7709e2..1d8a41c22d 100644
--- a/var/spack/repos/builtin/packages/kokkos/package.py
+++ b/var/spack/repos/builtin/packages/kokkos/package.py
@@ -217,6 +217,11 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
def cmake_args(self):
spec = self.spec
+
+ if spec.satisfies('~wrapper+cuda') and not spec.satisfies('%clang'):
+ raise InstallError("Kokkos requires +wrapper when using +cuda"
+ "without clang")
+
options = []
isdiy = "+diy" in spec