nvhpc: conflict with all compilers except for gcc (#31073)

This commit is contained in:
Sergey Kosukhin 2022-06-13 16:47:28 +02:00 committed by GitHub
parent b38afa7528
commit 696d81513d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,12 +119,12 @@ class Nvhpc(Package):
provides('lapack', when='+lapack')
provides('mpi', when='+mpi')
# TODO: effectively gcc is a direct dependency of nvhpc, but we cannot
# express that properly. For now, add conflicts for popular non-gcc
# compilers instead.
conflicts('%clang')
conflicts('%intel')
conflicts('%xl')
# TODO: effectively gcc is a direct dependency of nvhpc, but we cannot express that
# properly. For now, add conflicts for non-gcc compilers instead.
for __compiler in spack.compilers.supported_compilers():
if __compiler != 'gcc':
conflicts('%{0}'.format(__compiler),
msg='nvhpc must be installed with %gcc')
def _version_prefix(self):
return join_path(