From 36ae5ac6ef902b608a2f3c4857094790d3ec4186 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:54:14 -0800 Subject: [PATCH] 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. --- var/spack/repos/builtin/packages/kokkos/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py index 22fa7709e23..1d8a41c22de 100644 --- a/var/spack/repos/builtin/packages/kokkos/package.py +++ b/var/spack/repos/builtin/packages/kokkos/package.py @@ -217,6 +217,11 @@ def setup_dependent_package(self, module, dependent_spec): 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