From e79f275bc90fe3ba8a93bc28bd4565dd4903a351 Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Mon, 26 Jun 2023 18:25:46 -0700 Subject: CachedCMakePackage: set build type (#38502) Fixed the cached CMake package so that the build_type field is saved in the cached configuration file. --- lib/spack/spack/build_systems/cached_cmake.py | 1 + var/spack/repos/builtin/packages/lbann/package.py | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/spack/spack/build_systems/cached_cmake.py b/lib/spack/spack/build_systems/cached_cmake.py index f1a466597c..ef59698ce6 100644 --- a/lib/spack/spack/build_systems/cached_cmake.py +++ b/lib/spack/spack/build_systems/cached_cmake.py @@ -289,6 +289,7 @@ class CachedCMakeBuilder(CMakeBuilder): "# CMake executable path: {0}".format(self.pkg.spec["cmake"].command.path), "#------------------{0}\n".format("-" * 60), 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): diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py index 80dd919bf3..d62f735612 100644 --- a/var/spack/repos/builtin/packages/lbann/package.py +++ b/var/spack/repos/builtin/packages/lbann/package.py @@ -393,14 +393,6 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage): if "platform=cray" in spec: 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 def initconfig_package_entries(self): -- cgit v1.2.3-60-g2f50