summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-03 16:55:12 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-02-03 16:55:19 (GMT)
commitdfd7ca0d99b3745950925e585e73864036c0904b (patch)
tree9e62f9d1e476a9a54defb8269084c372e1e85997
parent16d91cbf7e4502f2504bbc8543f5d9ea0732d806 (diff)
parent2834f3355d30f5ac9faaf47fc2e34dfa6f300c7e (diff)
downloadCMake-dfd7ca0d99b3745950925e585e73864036c0904b.zip
CMake-dfd7ca0d99b3745950925e585e73864036c0904b.tar.gz
CMake-dfd7ca0d99b3745950925e585e73864036c0904b.tar.bz2
Merge topic 'bootstrap-c++-features'
2834f3355d Bootstrap: take care of C++ features configuration Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4301
-rwxr-xr-xbootstrap24
1 files changed, 24 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap
index da73bad..d529f3b 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1234,6 +1234,29 @@ fi
echo "C++ compiler on this system is: ${cmake_cxx_compiler} ${cmake_cxx_flags}"
#-----------------------------------------------------------------------------
+# Test CXX features
+
+cmake_cxx_features="make_unique"
+
+for feature in ${cmake_cxx_features}; do
+ eval "cmake_have_cxx_${feature}=0"
+ echo "Checking whether '${cmake_cxx_compiler} ${cmake_cxx_flags}' supports '${feature}'." >> cmake_bootstrap.log 2>&1
+ if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags}" \
+ "${cmake_source_dir}/Source/Checks/cm_cxx_${feature}.cxx" >> cmake_bootstrap.log 2>&1; then
+ eval "cmake_have_cxx_${feature}=1"
+ fi
+done
+
+cmake_have_cxx_features=""
+for feature in ${cmake_cxx_features}; do
+ feature_variable="cmake_have_cxx_${feature}"
+ eval "feature_value=\${${feature_variable}}"
+ if [ "${feature_value}" -eq "1" ]; then
+ cmake_have_cxx_features="${cmake_have_cxx_features} -DCMake_HAVE_CXX_`cmake_toupper ${feature}`=${feature_value}"
+ fi
+done
+
+#-----------------------------------------------------------------------------
# Test Make
cmake_make_processor=
@@ -1534,6 +1557,7 @@ cmake_c_flags="${cmake_c_flags} \
-I`cmake_escape \"${cmake_source_dir}/Utilities\"`"
cmake_cxx_flags="${cmake_cxx_flags} \
-DCMAKE_BOOTSTRAP \
+ ${cmake_have_cxx_features} \
-I`cmake_escape \"${cmake_bootstrap_dir}\"` \
-I`cmake_escape \"${cmake_source_dir}/Source\"` \
-I`cmake_escape \"${cmake_source_dir}/Source/LexerParser\"` \