diff options
author | Brad King <brad.king@kitware.com> | 2011-01-19 19:01:57 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-01-19 19:01:57 (GMT) |
commit | 1a0ff79898d6ccd7e1dafad384a8b1a7461d3424 (patch) | |
tree | 81df793526fec1560111480cf0a77ddf491651ec | |
parent | cbd40b3b7cd569c87ebcdac03ec0931a6f47771d (diff) | |
parent | 3cba29d2203760b2b8e64c34309e764dd2e2c4f2 (diff) | |
download | CMake-1a0ff79898d6ccd7e1dafad384a8b1a7461d3424.zip CMake-1a0ff79898d6ccd7e1dafad384a8b1a7461d3424.tar.gz CMake-1a0ff79898d6ccd7e1dafad384a8b1a7461d3424.tar.bz2 |
Merge topic 'bootstrap-enable-ccache-issue-11707'
3cba29d bootstrap: Add --enable-ccache option (#11707)
-rwxr-xr-x | bootstrap | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -299,6 +299,7 @@ Configuration: --verbose display more information --parallel=n bootstrap cmake in parallel, where n is number of nodes [1] + --enable-ccache Enable ccache when building cmake --init=FILE load FILE as script to populate cache --system-libs use all system-installed third-party libraries (for use only by package maintainers) @@ -523,6 +524,7 @@ cmake_try_make () # Parse arguments cmake_verbose= cmake_parallel_make= +cmake_ccache_enabled= cmake_prefix_dir="${cmake_default_prefix}" for a in "$@"; do if echo $a | grep "^--prefix=" > /dev/null 2> /dev/null; then @@ -578,6 +580,9 @@ for a in "$@"; do if echo $a | grep "^--verbose" > /dev/null 2> /dev/null; then cmake_verbose=TRUE fi + if echo $a | grep "^--enable-ccache" > /dev/null 2> /dev/null; then + cmake_ccache_enabled=TRUE + fi done # If verbose, display some information about bootstrap @@ -1513,6 +1518,10 @@ cd "${cmake_binary_dir}" # build with same compiler and make CC="${cmake_c_compiler}" CXX="${cmake_cxx_compiler}" +if [ -n "${cmake_ccache_enabled}" ]; then + CC="ccache ${CC}" + CXX="ccache ${CXX}" +fi MAKE="${cmake_make_processor}" export CC export CXX |