check for package in spec not variant (#23157)
This commit is contained in:
parent
09e80604f5
commit
58a897be0e
@ -128,7 +128,7 @@ def initconfig_compiler_entries(self):
|
|||||||
def initconfig_mpi_entries(self):
|
def initconfig_mpi_entries(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
|
|
||||||
if "+mpi" not in spec:
|
if not spec.satisfies('^mpi'):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
entries = [
|
entries = [
|
||||||
@ -194,7 +194,7 @@ def initconfig_hardware_entries(self):
|
|||||||
"#------------------{0}\n".format("-" * 60),
|
"#------------------{0}\n".format("-" * 60),
|
||||||
]
|
]
|
||||||
|
|
||||||
if '+cuda' in spec:
|
if spec.satisfies('^cuda'):
|
||||||
entries.append("#------------------{0}".format("-" * 30))
|
entries.append("#------------------{0}".format("-" * 30))
|
||||||
entries.append("# Cuda")
|
entries.append("# Cuda")
|
||||||
entries.append("#------------------{0}\n".format("-" * 30))
|
entries.append("#------------------{0}\n".format("-" * 30))
|
||||||
@ -206,7 +206,7 @@ def initconfig_hardware_entries(self):
|
|||||||
entries.append(cmake_cache_path("CMAKE_CUDA_COMPILER",
|
entries.append(cmake_cache_path("CMAKE_CUDA_COMPILER",
|
||||||
cudacompiler))
|
cudacompiler))
|
||||||
|
|
||||||
if "+mpi" in spec:
|
if spec.satisfies('^mpi'):
|
||||||
entries.append(cmake_cache_path("CMAKE_CUDA_HOST_COMPILER",
|
entries.append(cmake_cache_path("CMAKE_CUDA_HOST_COMPILER",
|
||||||
"${MPI_CXX_COMPILER}"))
|
"${MPI_CXX_COMPILER}"))
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user