summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris White <white238@llnl.gov>2022-10-27 23:04:18 -0700
committerGitHub <noreply@github.com>2022-10-27 23:04:18 -0700
commitd4a0f588e98d945a4be0bb5b388bad8797425766 (patch)
tree1053eb1cc5be020c096ab6b33e945039aa63aa61 /lib
parentb81b54a74c4beb4cb76657cbabd3cf81b60ad89a (diff)
downloadspack-d4a0f588e98d945a4be0bb5b388bad8797425766.tar.gz
spack-d4a0f588e98d945a4be0bb5b388bad8797425766.tar.bz2
spack-d4a0f588e98d945a4be0bb5b388bad8797425766.tar.xz
spack-d4a0f588e98d945a4be0bb5b388bad8797425766.zip
CachedCMakePackage: Add back initconfig as a defined phase (#33575)
Also: add type annotation to indicate that "phases" is always a tuple of strings.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_systems/cached_cmake.py7
-rw-r--r--lib/spack/spack/build_systems/cmake.py2
-rw-r--r--lib/spack/spack/builder.py2
3 files changed, 7 insertions, 4 deletions
diff --git a/lib/spack/spack/build_systems/cached_cmake.py b/lib/spack/spack/build_systems/cached_cmake.py
index 7caf2a1539..84f402299a 100644
--- a/lib/spack/spack/build_systems/cached_cmake.py
+++ b/lib/spack/spack/build_systems/cached_cmake.py
@@ -32,6 +32,10 @@ def cmake_cache_option(name, boolean_value, comment=""):
class CachedCMakeBuilder(CMakeBuilder):
+ #: Phases of a Cached CMake package
+ #: Note: the initconfig phase is used for developer builds as a final phase to stop on
+ phases = ("initconfig", "cmake", "build", "install") # type: Tuple[str, ...]
+
#: Names associated with package methods in the old build-system format
legacy_methods = CMakeBuilder.legacy_methods + (
"initconfig_compiler_entries",
@@ -224,8 +228,7 @@ class CachedCMakeBuilder(CMakeBuilder):
"""This method is to be overwritten by the package"""
return []
- @spack.builder.run_before("cmake")
- def initconfig(self):
+ def initconfig(self, pkg, spec, prefix):
cache_entries = (
self.std_initconfig_entries()
+ self.initconfig_compiler_entries()
diff --git a/lib/spack/spack/build_systems/cmake.py b/lib/spack/spack/build_systems/cmake.py
index 8d8bba4778..1d0c50ea07 100644
--- a/lib/spack/spack/build_systems/cmake.py
+++ b/lib/spack/spack/build_systems/cmake.py
@@ -155,7 +155,7 @@ class CMakeBuilder(BaseBuilder):
"""
#: Phases of a CMake package
- phases = ("cmake", "build", "install")
+ phases = ("cmake", "build", "install") # type: Tuple[str, ...]
#: Names associated with package methods in the old build-system format
legacy_methods = ("cmake_args", "check") # type: Tuple[str, ...]
diff --git a/lib/spack/spack/builder.py b/lib/spack/spack/builder.py
index 6baa321eea..7ae36b6e0a 100644
--- a/lib/spack/spack/builder.py
+++ b/lib/spack/spack/builder.py
@@ -469,7 +469,7 @@ class Builder(six.with_metaclass(BuilderMeta, llnl.util.compat.Sequence)):
"""
#: Sequence of phases. Must be defined in derived classes
- phases = None # type: Optional[Tuple[str, ...]]
+ phases = () # type: Tuple[str, ...]
#: Build system name. Must also be defined in derived classes.
build_system = None # type: Optional[str]