CachedCMakePackage: set build type (#38502)

Fixed the cached CMake package so that the build_type field is saved
in the cached configuration file.
This commit is contained in:
Brian Van Essen 2023-06-26 18:25:46 -07:00 committed by GitHub
parent 09b4ed6c80
commit e79f275bc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 8 deletions

View File

@ -289,6 +289,7 @@ def std_initconfig_entries(self):
"# CMake executable path: {0}".format(self.pkg.spec["cmake"].command.path), "# CMake executable path: {0}".format(self.pkg.spec["cmake"].command.path),
"#------------------{0}\n".format("-" * 60), "#------------------{0}\n".format("-" * 60),
cmake_cache_path("CMAKE_PREFIX_PATH", cmake_prefix_path), cmake_cache_path("CMAKE_PREFIX_PATH", cmake_prefix_path),
self.define_cmake_cache_from_variant("CMAKE_BUILD_TYPE", "build_type"),
] ]
def initconfig_package_entries(self): def initconfig_package_entries(self):

View File

@ -393,14 +393,6 @@ def initconfig_hardware_entries(self):
if "platform=cray" in spec: if "platform=cray" in spec:
entries.append(cmake_cache_option("MPI_ASSUME_NO_BUILTIN_MPI", True)) entries.append(cmake_cache_option("MPI_ASSUME_NO_BUILTIN_MPI", True))
cxxflags_str = " ".join(self.spec.compiler_flags["cxxflags"])
entries.append(
cmake_cache_string(
"HIP_HIPCC_FLAGS",
"-g -fsized-deallocation -fPIC -std=c++17 {0}".format(cxxflags_str),
)
)
return entries return entries
def initconfig_package_entries(self): def initconfig_package_entries(self):