summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-13 14:32:56 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-13 14:37:14 (GMT)
commita3deae71990e0fd6b495bb3e925755cdbcaf89eb (patch)
treeddda95995916980ed5032e368c3a0d66c989d04c /bootstrap
parentffa164736ec78f27583ca4515ff3dfc7a82fc702 (diff)
downloadCMake-a3deae71990e0fd6b495bb3e925755cdbcaf89eb.zip
CMake-a3deae71990e0fd6b495bb3e925755cdbcaf89eb.tar.gz
CMake-a3deae71990e0fd6b495bb3e925755cdbcaf89eb.tar.bz2
bootstrap: Fix running multiple times in-source
Since commit v3.9.0-rc1~281^2 (Use quotes for non-system includes, 2017-04-11) we include `cmConfigure.h` via `""` instead of `<>`. This breaks the `bootstrap` script when run more than once in an in-source build. In that case `cmConfigure.h` is generated next to the source files that include it, so `""`-style includes prevent the `Bootstrap.cmk/cmConfigure.h` file from being included during bootstrap. Fix this by teaching the bootstrap script to remove any `cmConfigure.h` that may have been generated by an earlier run in an in-source build. Fixes: #17082
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap6
1 files changed, 6 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap
index 84df54a..7674130 100755
--- a/bootstrap
+++ b/bootstrap
@@ -830,6 +830,12 @@ rm -f "${cmake_bootstrap_dir}/cmake_bootstrap.log"
rm -f "${cmake_bootstrap_dir}/cmConfigure.h${_tmp}"
rm -f "${cmake_bootstrap_dir}/cmVersionConfig.h${_tmp}"
+# If building in-source, remove any cmConfigure.h that may
+# have been created by a previous run of the bootstrap cmake.
+if [ -n "${cmake_in_source_build}" ]; then
+ rm -f "${cmake_source_dir}/Source/cmConfigure.h"
+fi
+
# If exist compiler flags, set them
cmake_c_flags=${CFLAGS}
cmake_cxx_flags=${CXXFLAGS}