CachedCMakePackage: Add back initconfig as a defined phase (#33575)
Also: add type annotation to indicate that "phases" is always a tuple of strings.
This commit is contained in:
parent
b81b54a74c
commit
d4a0f588e9
@ -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 @@ def initconfig_package_entries(self):
|
||||
"""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()
|
||||
|
@ -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, ...]
|
||||
|
@ -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]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user