summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages/cmake/package.py
diff options
context:
space:
mode:
authorTom Scogland <scogland1@llnl.gov>2022-08-17 17:54:17 -0700
committerGitHub <noreply@github.com>2022-08-17 17:54:17 -0700
commitb9e57006c98c5ea3836a33a55a41a516e52f3e4b (patch)
tree54110b6ca18b0cdf413df5a237d451af6333d1be /var/spack/repos/builtin.mock/packages/cmake/package.py
parentc386181c0f804222f1aabb8419162bfe9916cce9 (diff)
downloadspack-b9e57006c98c5ea3836a33a55a41a516e52f3e4b.tar.gz
spack-b9e57006c98c5ea3836a33a55a41a516e52f3e4b.tar.bz2
spack-b9e57006c98c5ea3836a33a55a41a516e52f3e4b.tar.xz
spack-b9e57006c98c5ea3836a33a55a41a516e52f3e4b.zip
bugfix: use cmake version from dependency (#31739)
Ensure that build tools with module-level commands in spack use the version built as part of their build graph if one exists. This is now also required for mesa, scons, cmake and ctest, out of graph versions of these tools in path will not be found unless added as an external. This bug appeared because a new version of rocprim needs cmake 3.16, while I have 3.14 in my path I had added an external for cmake 3.20 to the dag, but 3.14 was still used to configure rocprim causing it to fail. As far as I can tell, all the build tools added in build_environment.py had this problem, despite the fact that they should have been resolving these tools by name with a path search and find the one in the dag that way. I'm still investigating why the path searching and Executable logic didn't do it, but this makes three of the build systems much more explicit, and leaves only gmake and ninja as dependencies from out in the system while ensuring the version in the dag is used if there is one. The additional sqlite version is to perturb the hash of python to work around a relocation bug which will be fixed in a subsequent PR.
Diffstat (limited to 'var/spack/repos/builtin.mock/packages/cmake/package.py')
-rw-r--r--var/spack/repos/builtin.mock/packages/cmake/package.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/cmake/package.py b/var/spack/repos/builtin.mock/packages/cmake/package.py
index 4fe890df1a..30c3647df2 100644
--- a/var/spack/repos/builtin.mock/packages/cmake/package.py
+++ b/var/spack/repos/builtin.mock/packages/cmake/package.py
@@ -40,6 +40,8 @@ class Cmake(Package):
def setup_dependent_package(self, module, dspec):
spack_cc # Ensure spack module-scope variable is avaiable
+ module.cmake = Executable(self.spec.prefix.bin.cmake)
+ module.ctest = Executable(self.spec.prefix.bin.ctest)
self.spec.from_cmake = "from_cmake"
module.from_cmake = "from_cmake"