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