diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2020-12-02 12:25:57 +0100 |
---|---|---|
committer | Tamara Dahlgren <dahlgren1@llnl.gov> | 2021-02-17 17:07:20 -0800 |
commit | 63d75cd0891ac8411e3307b0b1ea3e3ea5d3f5bb (patch) | |
tree | 857fc7fc92af53e60718d80e51abecf0d1a008aa /var | |
parent | 598c25b434aa2599f4ad45cff3749efd36c99c9e (diff) | |
download | spack-63d75cd0891ac8411e3307b0b1ea3e3ea5d3f5bb.tar.gz spack-63d75cd0891ac8411e3307b0b1ea3e3ea5d3f5bb.tar.bz2 spack-63d75cd0891ac8411e3307b0b1ea3e3ea5d3f5bb.tar.xz spack-63d75cd0891ac8411e3307b0b1ea3e3ea5d3f5bb.zip |
boost: disable find_package's config mode for boost prior to v1.70.0 (#20198)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/boost/package.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 12831c5fd5..089758fb73 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -539,3 +539,16 @@ class Boost(Package): def setup_run_environment(self, env): env.set('BOOST_ROOT', self.prefix) + + def setup_dependent_package(self, module, dependent_spec): + # Disable find package's config mode for versions of Boost that + # didn't provide it. See https://github.com/spack/spack/issues/20169 + # and https://cmake.org/cmake/help/latest/module/FindBoost.html + is_cmake = isinstance(dependent_spec.package, CMakePackage) + if self.spec.satisfies('boost@:1.69.0') and is_cmake: + args_fn = type(dependent_spec.package).cmake_args + + def _cmake_args(self): + return ['-DBoost_NO_BOOST_CMAKE=ON'] + args_fn(self) + + type(dependent_spec.package).cmake_args = _cmake_args |