diff options
author | Brad King <brad.king@kitware.com> | 2012-09-21 14:06:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-09-21 14:06:00 (GMT) |
commit | a1c032b99477b1cd29be0e196187c5b878d00d5f (patch) | |
tree | d6b59d487b181d9f6737811a1820360a2adb3a94 | |
parent | 230ea218a76df931b31394998f121eb34ba8f5ff (diff) | |
download | CMake-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.
-rwxr-xr-x | bootstrap | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 ' |