diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-01-25 16:05:51 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-01-31 14:25:07 +0300 |
commit | d4673a2ff058529488dddf2e0520ee68ec88a0c7 (patch) | |
tree | a2a622511aa5af0b67d91da19937b48539f67041 /project/ci/cmake.py | |
parent | project.ci: auto-fill --toolset from environment (diff) | |
download | cmake-common-d4673a2ff058529488dddf2e0520ee68ec88a0c7.tar.gz cmake-common-d4673a2ff058529488dddf2e0520ee68ec88a0c7.zip |
project.ci: use pre-built Boost when available
Diffstat (limited to 'project/ci/cmake.py')
-rw-r--r-- | project/ci/cmake.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/project/ci/cmake.py b/project/ci/cmake.py index 6635dbf..70fd885 100644 --- a/project/ci/cmake.py +++ b/project/ci/cmake.py @@ -43,12 +43,21 @@ def build_ci(dirs, argv=None): src_dir = os.path.join(src_dir, args.subdir) install_dir = dirs.get_install_dir() if args.install else None + boost_dir = args.boost_dir + if not boost_dir: + # If we've built Boost using project.ci.boost already, use that. + # Otherwise, try to use the latest pre-built Boost provided by the CI + # system. + boost_dir = dirs.get_boost_dir() + if not os.path.isdir(boost_dir): + boost_dir = dirs.get_prebuilt_boost_dir() + params = BuildParameters(src_dir, build_dir=dirs.get_cmake_dir(), install_dir=install_dir, platform=dirs.get_platform(), configuration=dirs.get_configuration(), - boost_dir=args.boost_dir or dirs.get_boost_dir(), + boost_dir=boost_dir, toolset=dirs.get_toolset(), cmake_args=dirs.get_cmake_args() + args.cmake_args) build(params) |