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.
This commit is contained in:
parent
230ea218a7
commit
a1c032b994
|
@ -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 '
|
||||
|
|
Loading…
Reference in New Issue