From a1c032b99477b1cd29be0e196187c5b878d00d5f Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 21 Sep 2012 10:06:00 -0400 Subject: 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. --- bootstrap | 8 ++++++++ 1 file changed, 8 insertions(+) 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 ' -- cgit v0.12