From 1cc7a3533bc31b09ca5a626cb38d3c8dd9b6997d Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Sun, 16 Feb 2020 22:30:32 +0100 Subject: [PATCH] Fix header-only installation of Boost. (#14995) --- .../repos/builtin/packages/boost/package.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 884aaa40b6a..452ae99b8ab 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -405,15 +405,6 @@ def install(self, spec, prefix): for lib in Boost.all_libs: if "+{0}".format(lib) in spec: with_libs.append(lib) - if not with_libs: - # if no libraries are specified for compilation, then you dont have - # to configure/build anything, just copy over to the prefix - # directory. - src = join_path(self.stage.source_path, 'boost') - mkdirp(join_path(prefix, 'include')) - dst = join_path(prefix, 'include', 'boost') - install_tree(src, dst) - return # Remove libraries that the release version does not support if spec.satisfies('@1.69.0:') and 'signals' in with_libs: @@ -433,6 +424,16 @@ def install(self, spec, prefix): if '+graph' in spec and '+mpi' in spec: with_libs.append('graph_parallel') + if not with_libs: + # if no libraries are specified for compilation, then you dont have + # to configure/build anything, just copy over to the prefix + # directory. + src = join_path(self.stage.source_path, 'boost') + mkdirp(join_path(prefix, 'include')) + dst = join_path(prefix, 'include', 'boost') + install_tree(src, dst) + return + # to make Boost find the user-config.jam env['BOOST_BUILD_PATH'] = self.stage.source_path