diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2023-10-17 08:38:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-17 08:38:06 +0200 |
commit | 348e5cb522eb6041f8556ed5823fb63aa23305c7 (patch) | |
tree | f23f4d9050fc45024b482a9c813ca898376603f7 /var/spack/repos/builtin/packages/blaspp/package.py | |
parent | 7cc17f208c2b2a10491c6cbe23e7b65fd2482447 (diff) | |
download | spack-348e5cb522eb6041f8556ed5823fb63aa23305c7.tar.gz spack-348e5cb522eb6041f8556ed5823fb63aa23305c7.tar.bz2 spack-348e5cb522eb6041f8556ed5823fb63aa23305c7.tar.xz spack-348e5cb522eb6041f8556ed5823fb63aa23305c7.zip |
packages: use "requires" to allow only selected compilers (#40567)
A few packages have encoded an idiom that pre-dates the introduction
of the 'requires' directive, and they cycle over all compilers
to conflict with the ones that are not supported.
Here instead we reverse the logic, and require the ones that
are supported.
Diffstat (limited to 'var/spack/repos/builtin/packages/blaspp/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/blaspp/package.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/var/spack/repos/builtin/packages/blaspp/package.py b/var/spack/repos/builtin/packages/blaspp/package.py index f6f52d2756..d43ab4de6b 100644 --- a/var/spack/repos/builtin/packages/blaspp/package.py +++ b/var/spack/repos/builtin/packages/blaspp/package.py @@ -72,15 +72,7 @@ class Blaspp(CMakePackage, CudaPackage, ROCmPackage): conflicts("+cuda", when="+sycl", msg=backend_msg) conflicts("+sycl", when="@:2023.06.00", msg="SYCL support requires BLAS++ version 2023.08.25") - # TODO: +sycl requires use of the intel-oneapi compiler, but we cannot express that directly. - # For now, add conflicts for other compilers instead. - for __compiler in spack.compilers.supported_compilers(): - if __compiler != "oneapi": - conflicts( - "%{0}".format(__compiler), - when="+sycl", - msg="blaspp+sycl must be compiled with %oneapi", - ) + requires("%oneapi", when="+sycl", msg="blaspp+sycl must be compiled with %oneapi") def cmake_args(self): spec = self.spec |