Move new CUDA conflicts inside when('~allow-unsupported-compilers') block (#26132)

* Move new CUDA conflicts inside when('~allow-unsupported-compilers') block

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
This commit is contained in:
David Beckingsale 2021-09-29 17:22:26 -07:00 committed by GitHub
parent 2ea1bf84ec
commit d31830eaf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ class CudaPackage(PackageBase):
"""Auxiliary class which contains CUDA variant, dependencies and conflicts """Auxiliary class which contains CUDA variant, dependencies and conflicts
and is meant to unify and facilitate its usage. and is meant to unify and facilitate its usage.
Maintainers: ax3l, Rombur Maintainers: ax3l, Rombur, davidbeckingsale
""" """
# https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#gpu-feature-list # https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#gpu-feature-list
@ -86,6 +86,9 @@ def cuda_flags(arch_list):
# apply to platform=darwin. We currently do not provide conflicts for # apply to platform=darwin. We currently do not provide conflicts for
# platform=darwin with %apple-clang. # platform=darwin with %apple-clang.
# Linux x86_64 compiler conflicts from here:
# https://gist.github.com/ax3l/9489132
with when('~allow-unsupported-compilers'):
# GCC # GCC
# According to # According to
# https://github.com/spack/spack/pull/25054#issuecomment-886531664 # https://github.com/spack/spack/pull/25054#issuecomment-886531664
@ -106,10 +109,6 @@ def cuda_flags(arch_list):
# https://gist.github.com/ax3l/9489132#gistcomment-3860114 # https://gist.github.com/ax3l/9489132#gistcomment-3860114
conflicts('%gcc@10', when='+cuda ^cuda@:11.4.0') conflicts('%gcc@10', when='+cuda ^cuda@:11.4.0')
# Linux x86_64 compiler conflicts from here:
# https://gist.github.com/ax3l/9489132
with when('~allow-unsupported-compilers'):
conflicts('%gcc@5:', when='+cuda ^cuda@:7.5 target=x86_64:') conflicts('%gcc@5:', when='+cuda ^cuda@:7.5 target=x86_64:')
conflicts('%gcc@6:', when='+cuda ^cuda@:8 target=x86_64:') conflicts('%gcc@6:', when='+cuda ^cuda@:8 target=x86_64:')
conflicts('%gcc@7:', when='+cuda ^cuda@:9.1 target=x86_64:') conflicts('%gcc@7:', when='+cuda ^cuda@:9.1 target=x86_64:')