summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-09-21 14:06:00 (GMT)
committerBrad King <brad.king@kitware.com>2012-09-21 14:06:00 (GMT)
commita1c032b99477b1cd29be0e196187c5b878d00d5f (patch)
treed6b59d487b181d9f6737811a1820360a2adb3a94 /bootstrap
parent230ea218a76df931b31394998f121eb34ba8f5ff (diff)
downloadCMake-a1c032b99477b1cd29be0e196187c5b878d00d5f.zip
CMake-a1c032b99477b1cd29be0e196187c5b878d00d5f.tar.gz
CMake-a1c032b99477b1cd29be0e196187c5b878d00d5f.tar.bz2
bootstrap: Suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot
In order to bootstrap on OS X with Xcode without the command line tools one must add -isysroot to CFLAGS and CXXFLAGS. In this case the flags will make it into the configured CMake. Set CMAKE_OSX_SYSROOT to empty in the initial cache to prevent CMake from adding -isysroot again.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap8
1 files changed, 8 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap
index 23134d0..ceddfdc 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1505,6 +1505,14 @@ set (CMAKE_MAN_DIR "'"${cmake_man_dir}"'" CACHE PATH "Install location for man p
set (CMAKE_DATA_DIR "'"${cmake_data_dir}"'" CACHE PATH "Install location for data (relative to prefix)." FORCE)
' > "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
+# Suppress -isysroot if user-provided flags already have it.
+if echo "${cmake_c_flags}" | grep isysroot >/dev/null 2>&1 &&
+ echo "${cmake_cxx_flags}" | grep isysroot >/dev/null 2>&1; then
+ echo '
+set(CMAKE_OSX_SYSROOT "" CACHE PATH "" FORCE)
+' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
+fi
+
# Add configuration settings given as command-line options.
if [ "x${cmake_bootstrap_qt_gui}" != "x" ]; then
echo '