summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2023-06-03 18:08:02 -0700
committerGitHub <noreply@github.com>2023-06-03 18:08:02 -0700
commit237a0d8999154d6a291bfff56a8bf12ecb104c5b (patch)
treecd4d25a81dfb089abb60c5feca39257b1d6b2195
parent6952ed9950c7c5b7e2e359aa2ba91ce6dec678c8 (diff)
downloadspack-237a0d8999154d6a291bfff56a8bf12ecb104c5b.tar.gz
spack-237a0d8999154d6a291bfff56a8bf12ecb104c5b.tar.bz2
spack-237a0d8999154d6a291bfff56a8bf12ecb104c5b.tar.xz
spack-237a0d8999154d6a291bfff56a8bf12ecb104c5b.zip
Add explicit CMake .libs implementation that returns an empty list; same for .headers (#35816)
-rw-r--r--var/spack/repos/builtin/packages/cmake/package.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py
index 34bbd636cd..a70f04152d 100644
--- a/var/spack/repos/builtin/packages/cmake/package.py
+++ b/var/spack/repos/builtin/packages/cmake/package.py
@@ -436,6 +436,22 @@ class Cmake(Package):
module.cmake = Executable(self.spec.prefix.bin.cmake)
module.ctest = Executable(self.spec.prefix.bin.ctest)
+ @property
+ def libs(self):
+ """CMake has no libraries, so if you ask for `spec['cmake'].libs`
+ (which happens automatically for packages that depend on CMake as
+ a link dependency) the default implementation of ``.libs` will
+ search the entire root prefix recursively before failing.
+
+ The longer term solution is for all dependents of CMake to change
+ their deptype. For now, this returns an empty set of libraries.
+ """
+ return LibraryList([])
+
+ @property
+ def headers(self):
+ return HeaderList([])
+
def run_version_check(self, bin):
"""Runs and checks output of the installed binary."""
exe_path = join_path(self.prefix.bin, bin)