check for package in spec not variant (#23157)

This commit is contained in:
Chris White 2021-04-20 17:13:15 -07:00 committed by GitHub
parent 09e80604f5
commit 58a897be0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ def initconfig_compiler_entries(self):
def initconfig_mpi_entries(self):
spec = self.spec
if "+mpi" not in spec:
if not spec.satisfies('^mpi'):
return []
entries = [
@ -194,7 +194,7 @@ def initconfig_hardware_entries(self):
"#------------------{0}\n".format("-" * 60),
]
if '+cuda' in spec:
if spec.satisfies('^cuda'):
entries.append("#------------------{0}".format("-" * 30))
entries.append("# Cuda")
entries.append("#------------------{0}\n".format("-" * 30))
@ -206,7 +206,7 @@ def initconfig_hardware_entries(self):
entries.append(cmake_cache_path("CMAKE_CUDA_COMPILER",
cudacompiler))
if "+mpi" in spec:
if spec.satisfies('^mpi'):
entries.append(cmake_cache_path("CMAKE_CUDA_HOST_COMPILER",
"${MPI_CXX_COMPILER}"))
else: