diff options
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 207 |
1 files changed, 120 insertions, 87 deletions
@@ -9,15 +9,23 @@ die() { # Compile flag extraction function. cmake_extract_standard_flags() { - sed -n "s/ *set *( *CMAKE_${2}${3}_EXTENSION_COMPILE_OPTION *\"\{0,1\}\([^\")]*\).*/\1/p" \ - "${cmake_source_dir}/Modules/Compiler/"${1:-*}-${2}.cmake 2>/dev/null | tr ';' ' ' + id="${1:-*}" + lang="${2}" + ver="${3}" + sed -n "s/ *set *( *CMAKE_${lang}${ver}_EXTENSION_COMPILE_OPTION *\"\{0,1\}\([^\")]*\).*/\1/p" \ + "${cmake_source_dir}/Modules/Compiler/"${id}-${lang}.cmake \ + 2>/dev/null | tr ';' ' ' + # Clang's CXX compiler flags are in the common module. + sed -n "s/ *set *( *CMAKE_\\\${lang}${ver}_EXTENSION_COMPILE_OPTION *\"\{0,1\}\([^\")]*\).*/\1/p" \ + "${cmake_source_dir}/Modules/Compiler/Clang.cmake" \ + 2>/dev/null | tr ';' ' ' } # Version number extraction function. cmake_version_component() { sed -n " -/^set(CMake_VERSION_${1}/ {s/set(CMake_VERSION_${1} *\([0-9]*\))/\1/;p;} +/^set(CMake_VERSION_${1}/ {s/set(CMake_VERSION_${1} *\([0-9]*\)).*/\1/;p;} " "${cmake_source_dir}/Source/CMakeVersion.cmake" } @@ -52,7 +60,7 @@ cmake_version_minor="`cmake_version_component MINOR`" cmake_version_patch="`cmake_version_component PATCH`" cmake_version="${cmake_version_major}.${cmake_version_minor}.${cmake_version_patch}" cmake_version_rc="`cmake_version_component RC`" -if [ "$cmake_version_rc" != "" ]; then +if test "$cmake_version_rc" != ""; then cmake_version="${cmake_version}-rc${cmake_version_rc}" fi @@ -131,7 +139,7 @@ fi if echo "${cmake_system}" | grep HP-UX >/dev/null 2>&1; then die 'CMake no longer compiles on HP-UX. See - https://gitlab.kitware.com/cmake/cmake/issues/17137 + https://gitlab.kitware.com/cmake/cmake/-/issues/17137 Use CMake 3.9 or lower instead.' cmake_system_hpux=true @@ -201,13 +209,13 @@ esac # Choose the default install prefix. if ${cmake_system_mingw}; then - if [ "x${PROGRAMFILES}" != "x" ]; then + if test "x${PROGRAMFILES}" != "x"; then cmake_default_prefix=`cmake_fix_slashes "${PROGRAMFILES}/CMake"` - elif [ "x${ProgramFiles}" != "x" ]; then + elif test "x${ProgramFiles}" != "x"; then cmake_default_prefix=`cmake_fix_slashes "${ProgramFiles}/CMake"` - elif [ "x${SYSTEMDRIVE}" != "x" ]; then + elif test "x${SYSTEMDRIVE}" != "x"; then cmake_default_prefix=`cmake_fix_slashes "${SYSTEMDRIVE}/Program Files/CMake"` - elif [ "x${SystemDrive}" != "x" ]; then + elif test "x${SystemDrive}" != "x"; then cmake_default_prefix=`cmake_fix_slashes "${SystemDrive}/Program Files/CMake"` else cmake_default_prefix="c:/Program Files/CMake" @@ -239,8 +247,12 @@ CMAKE_PROBLEMATIC_FILES="\ */CMakeCXXCompiler.cmake \ Source/cmConfigure.h \ Source/CTest/Curl/config.h \ - Utilities/cmexpat/expatConfig.h \ - Utilities/cmexpat/expatDllConfig.h \ + Utilities/cmThirdParty.h \ + Utilities/cmcurl/lib/curl_config.h \ + Utilities/cmlibarchive/config.h \ + Utilities/cmliblzma/config.h \ + Utilities/cmnghttp2/config.h \ + Utilities/cmzlib/zlibDllConfig.h \ " CMAKE_UNUSED_SOURCES="\ @@ -404,7 +416,6 @@ CMAKE_CXX_SOURCES="\ cmProcessOutput \ cmProjectCommand \ cmPropertyDefinition \ - cmPropertyDefinitionMap \ cmPropertyMap \ cmReturnCommand \ cmRulePlaceholderExpander \ @@ -421,6 +432,7 @@ CMAKE_CXX_SOURCES="\ cmSiteNameCommand \ cmSourceFile \ cmSourceFileLocation \ + cmStandardLevelResolver \ cmState \ cmStateDirectory \ cmStateSnapshot \ @@ -467,6 +479,7 @@ if ${cmake_system_mingw}; then fi CMAKE_STD_CXX_HEADERS="\ + filesystem \ memory \ optional \ shared_mutex \ @@ -474,6 +487,7 @@ CMAKE_STD_CXX_HEADERS="\ utility \ " CMAKE_STD_CXX_SOURCES="\ + fs_path \ string_view \ " @@ -611,6 +625,8 @@ Configuration: --no-system-bzip2 use cmake-provided bzip2 library (default) --system-liblzma use system-installed liblzma library --no-system-liblzma use cmake-provided liblzma library (default) + --system-nghttp2 use system-installed nghttp2 library + --no-system-nghttp2 use cmake-provided nghttp2 library (default) --system-zstd use system-installed zstd library --no-system-zstd use cmake-provided zstd library (default) --system-libarchive use system-installed libarchive library @@ -620,6 +636,8 @@ Configuration: --system-libuv use system-installed libuv library --no-system-libuv use cmake-provided libuv library (default) + --bootstrap-system-libuv use system-installed libuv library for bootstrap + --qt-gui build the Qt-based GUI (requires Qt >= 4.2) --no-qt-gui do not build the Qt-based GUI (default) --qt-qmake=<qmake> use <qmake> as the qmake executable to find Qt @@ -663,7 +681,7 @@ cmake_error() echo "Error when bootstrapping CMake:" echo "$*" echo "---------------------------------------------" - if [ -f cmake_bootstrap.log ]; then + if test -f cmake_bootstrap.log; then echo "Log of errors: `pwd`/cmake_bootstrap.log" #cat cmake_bootstrap.log echo "---------------------------------------------" @@ -690,9 +708,9 @@ cmake_replace_string () OUTFILE="$2" SEARCHFOR="$3" REPLACEWITH="$4" - if [ -f "${INFILE}" ] || ${cmake_system_openvms}; then + if test -f "${INFILE}" || ${cmake_system_openvms}; then sed "s/\@${SEARCHFOR}\@/${REPLACEWITH}/g" "${INFILE}" > "${OUTFILE}${_tmp}" - if [ -f "${OUTFILE}${_tmp}" ]; then + if test -f "${OUTFILE}${_tmp}"; then if "${_diff}" "${OUTFILE}" "${OUTFILE}${_tmp}" > /dev/null 2> /dev/null ; then #echo "Files are the same" rm -f "${OUTFILE}${_tmp}" @@ -711,7 +729,7 @@ cmake_kwsys_config_replace_string () OUTFILE="$2" shift 2 APPEND="$*" - if [ -f "${INFILE}" ] || ${cmake_system_openvms}; then + if test -f "${INFILE}" || ${cmake_system_openvms}; then echo "${APPEND}" > "${OUTFILE}${_tmp}" sed "/./ {s/\@KWSYS_NAMESPACE\@/cmsys/g; s/@KWSYS_BUILD_SHARED@/${KWSYS_BUILD_SHARED}/g; @@ -722,7 +740,7 @@ cmake_kwsys_config_replace_string () s/@KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H@/${KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H}/g; s/@KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP@/${KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP}/g; }" "${INFILE}" >> "${OUTFILE}${_tmp}" - if [ -f "${OUTFILE}${_tmp}" ]; then + if test -f "${OUTFILE}${_tmp}"; then if "${_diff}" "${OUTFILE}" "${OUTFILE}${_tmp}" > /dev/null 2> /dev/null ; then #echo "Files are the same" rm -f "${OUTFILE}${_tmp}" @@ -779,7 +797,7 @@ cmake_try_run () COMPILER=$1 FLAGS=$2 TESTFILE=$3 - if [ ! -f "${TESTFILE}" ]; then + if test ! -f "${TESTFILE}"; then echo "Test file ${TESTFILE} missing. Please verify your CMake source tree." exit 4 fi @@ -791,18 +809,18 @@ cmake_try_run () echo "------------------------------------------" "${COMPILER}" ${FLAGS} "${TESTFILE}" -o "${TMPFILE}" RES=$? - if [ "${RES}" -ne "0" ]; then + if test "${RES}" -ne "0"; then echo "Test failed to compile" return 1 fi - if [ ! -f "${TMPFILE}" ] && [ ! -f "${TMPFILE}.exe" ]; then + if test ! -f "${TMPFILE}" && test ! -f "${TMPFILE}.exe"; then echo "Test failed to produce executable" return 2 fi ./${TMPFILE} RES=$? rm -f "${TMPFILE}" - if [ "${RES}" -ne "0" ]; then + if test "${RES}" -ne "0"; then echo "Test produced non-zero return code" return 3 fi @@ -818,18 +836,18 @@ cmake_try_make () echo "Try: ${MAKE_PROC}" "${MAKE_PROC}" ${MAKE_FLAGS} RES=$? - if [ "${RES}" -ne "0" ]; then + if test "${RES}" -ne "0"; then echo "${MAKE_PROC} does not work" return 1 fi - if [ ! -f "test" ] && [ ! -f "test.exe" ]; then + if test ! -f "test" && test ! -f "test.exe"; then echo "${COMPILER} does not produce output" return 2 fi ./test RES=$? rm -f "test" - if [ "${RES}" -ne "0" ]; then + if test "${RES}" -ne "0"; then echo "${MAKE_PROC} produces strange executable" return 3 fi @@ -842,6 +860,7 @@ cmake_verbose= cmake_parallel_make= cmake_ccache_enabled= cmake_prefix_dir="${cmake_default_prefix}" +bootstrap_system_libuv= while test $# != 0; do case "$1" in --prefix=*) dir=`cmake_arg "$1"` @@ -855,12 +874,13 @@ while test $# != 0; do --init=*) cmake_init_file=`cmake_arg "$1"` ;; --system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1" ;; --no-system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0" ;; - --system-bzip2|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-librhash|--system-zlib|--system-liblzma|--system-zstd|--system-libuv) + --system-bzip2|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-librhash|--system-zlib|--system-liblzma|--system-nghttp2|--system-zstd|--system-libuv) lib=`cmake_arg "$1" "--system-"` cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=1" ;; - --no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-jsoncpp|--no-system-libarchive|--no-system-librhash|--no-system-zlib|--no-system-liblzma|--no-system-zstd|--no-system-libuv) + --no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-jsoncpp|--no-system-libarchive|--no-system-librhash|--no-system-zlib|--no-system-liblzma|--no-system-nghttp2|--no-system-zstd|--no-system-libuv) lib=`cmake_arg "$1" "--no-system-"` cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=0" ;; + --bootstrap-system-libuv) bootstrap_system_libuv="1" ;; --qt-gui) cmake_bootstrap_qt_gui="1" ;; --no-qt-gui) cmake_bootstrap_qt_gui="0" ;; --qt-qmake=*) cmake_bootstrap_qt_qmake=`cmake_arg "$1"` ;; @@ -886,13 +906,13 @@ while test $# != 0; do done # If verbose, display some information about bootstrap -if [ -n "${cmake_verbose}" ]; then +if test -n "${cmake_verbose}"; then echo "---------------------------------------------" echo "Source directory: ${cmake_source_dir}" echo "Binary directory: ${cmake_binary_dir}" echo "Prefix directory: ${cmake_prefix_dir}" echo "System: ${cmake_system}" - if [ "x${cmake_parallel_make}" != "x" ]; then + if test "x${cmake_parallel_make}" != "x"; then echo "Doing parallel make: ${cmake_parallel_make}" fi echo "" @@ -904,18 +924,18 @@ echo "`cmake_version_display`" # Check for in-source build cmake_in_source_build= -if [ -f "${cmake_binary_dir}/Source/cmake.cxx" -a \ - -f "${cmake_binary_dir}/Source/cmake.h" ]; then - if [ -n "${cmake_verbose}" ]; then +if test -f "${cmake_binary_dir}/Source/cmake.cxx" && + test -f "${cmake_binary_dir}/Source/cmake.h"; then + if test -n "${cmake_verbose}"; then echo "Warning: This is an in-source build" fi cmake_in_source_build=TRUE fi # If this is not an in-source build, then Bootstrap stuff should not exist. -if [ -z "${cmake_in_source_build}" ]; then +if test -z "${cmake_in_source_build}"; then # Did somebody bootstrap in the source tree? - if [ -d "${cmake_source_dir}/Bootstrap${_cmk}" ]; then + if test -d "${cmake_source_dir}/Bootstrap${_cmk}"; then cmake_error 10 "Found directory \"${cmake_source_dir}/Bootstrap${_cmk}\". Looks like somebody did bootstrap CMake in the source tree, but now you are trying to do bootstrap in the binary tree. Please remove Bootstrap${_cmk} @@ -923,7 +943,7 @@ directory from the source tree." fi # Is there a cache in the source tree? for cmake_problematic_file in ${CMAKE_PROBLEMATIC_FILES}; do - if [ -f "${cmake_source_dir}/${cmake_problematic_file}" ]; then + if test -f "${cmake_source_dir}/${cmake_problematic_file}"; then cmake_error 10 "Found \"${cmake_source_dir}/${cmake_problematic_file}\". Looks like somebody tried to build CMake in the source tree, but now you are trying to do bootstrap in the binary tree. Please remove \"${cmake_problematic_file}\" @@ -933,14 +953,14 @@ from the source tree." fi # Make bootstrap directory -[ -d "${cmake_bootstrap_dir}" ] || mkdir "${cmake_bootstrap_dir}" -if [ ! -d "${cmake_bootstrap_dir}" ]; then +test -d "${cmake_bootstrap_dir}" || mkdir "${cmake_bootstrap_dir}" +if test ! -d "${cmake_bootstrap_dir}"; then cmake_error 3 "Cannot create directory ${cmake_bootstrap_dir} to bootstrap CMake." fi cd "${cmake_bootstrap_dir}" -[ -d "cmsys" ] || mkdir "cmsys" -if [ ! -d "cmsys" ]; then +test -d "cmsys" || mkdir "cmsys" +if test ! -d "cmsys"; then cmake_error 4 "Cannot create directory ${cmake_bootstrap_dir}/cmsys" fi @@ -951,7 +971,7 @@ rm -f "${cmake_bootstrap_dir}/cmVersionConfig.h${_tmp}" # If building in-source, remove any cmConfigure.h that may # have been created by a previous run of the bootstrap cmake. -if [ -n "${cmake_in_source_build}" ]; then +if test -n "${cmake_in_source_build}"; then rm -f "${cmake_source_dir}/Source/cmConfigure.h" fi @@ -1036,7 +1056,7 @@ cmake_toolchain_detect() done } -if [ -z "${CC}" -a -z "${CXX}" ]; then +if test -z "${CC}" && test -z "${CXX}"; then cmake_toolchain_detect fi @@ -1050,9 +1070,9 @@ esac cmake_c_compiler= # If CC is set, use that for compiler, otherwise use list of known compilers -if [ -n "${cmake_toolchain}" ]; then +if test -n "${cmake_toolchain}"; then eval cmake_c_compilers="\${cmake_toolchain_${cmake_toolchain}_CC}" -elif [ -n "${CC}" ]; then +elif test -n "${CC}"; then cmake_c_compilers="${CC}" else cmake_c_compilers="${CMAKE_KNOWN_C_COMPILERS}" @@ -1103,7 +1123,7 @@ for std in 11 99 90; do done rm -f "${TMPFILE}.c" -if [ -z "${cmake_c_compiler}" ]; then +if test -z "${cmake_c_compiler}"; then cmake_error 6 "Cannot find appropriate C compiler on this system. Please specify one using environment variable CC. See cmake_bootstrap.log for compilers attempted. @@ -1118,9 +1138,9 @@ cmake_cxx_compiler= # On Mac OSX, CC is the same as cc, so make sure not to try CC as c++ compiler. # If CC is set, use that for compiler, otherwise use list of known compilers -if [ -n "${cmake_toolchain}" ]; then +if test -n "${cmake_toolchain}"; then eval cmake_cxx_compilers="\${cmake_toolchain_${cmake_toolchain}_CXX}" -elif [ -n "${CXX}" ]; then +elif test -n "${CXX}"; then cmake_cxx_compilers="${CXX}" else cmake_cxx_compilers="${CMAKE_KNOWN_CXX_COMPILERS}" @@ -1224,7 +1244,7 @@ for std in 17 14 11; do done rm -f "${TMPFILE}.cxx" -if [ -z "${cmake_cxx_compiler}" ]; then +if test -z "${cmake_cxx_compiler}"; then cmake_error 7 "Cannot find a C++ compiler that supports both C++11 and the specified C++ flags. Please specify one using environment variable CXX. The C++ flags are \"$cmake_cxx_flags\". @@ -1236,7 +1256,7 @@ echo "C++ compiler on this system is: ${cmake_cxx_compiler} ${cmake_cxx_flags}" #----------------------------------------------------------------------------- # Test CXX features -cmake_cxx_features="make_unique" +cmake_cxx_features="make_unique filesystem" for feature in ${cmake_cxx_features}; do eval "cmake_have_cxx_${feature}=0" @@ -1251,11 +1271,14 @@ 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 + if test "${feature_value}" -eq "1"; then cmake_have_cxx_features="${cmake_have_cxx_features} -DCMake_HAVE_CXX_`cmake_toupper ${feature}`=${feature_value}" fi done +cmake_generate_file "${cmake_bootstrap_dir}/cmSTL.hxx" "" + + #----------------------------------------------------------------------------- # Test Make @@ -1263,7 +1286,7 @@ cmake_make_processor= cmake_make_flags= # If MAKE is set, use that for make processor, otherwise use list of known make -if [ -n "${MAKE}" ]; then +if test -n "${MAKE}"; then cmake_make_processors="${MAKE}" else cmake_make_processors="${CMAKE_KNOWN_MAKE_PROCESSORS}" @@ -1282,20 +1305,20 @@ echo ' int main(){ printf("1%c", (char)0x0a); return 0; } ' > "test.c" cmake_original_make_flags="${cmake_make_flags}" -if [ "x${cmake_parallel_make}" != "x" ]; then +if test "x${cmake_parallel_make}" != "x"; then cmake_make_flags="${cmake_make_flags} -j ${cmake_parallel_make}" fi for a in ${cmake_make_processors}; do - if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then + if test -z "${cmake_make_processor}" && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then cmake_make_processor="${a}" fi done cmake_full_make_flags="${cmake_make_flags}" -if [ "x${cmake_original_make_flags}" != "x${cmake_make_flags}" ]; then - if [ -z "${cmake_make_processor}" ]; then +if test "x${cmake_original_make_flags}" != "x${cmake_make_flags}"; then + if test -z "${cmake_make_processor}"; then cmake_make_flags="${cmake_original_make_flags}" for a in ${cmake_make_processors}; do - if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then + if test -z "${cmake_make_processor}" && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then cmake_make_processor="${a}" fi done @@ -1303,13 +1326,13 @@ if [ "x${cmake_original_make_flags}" != "x${cmake_make_flags}" ]; then fi cd "${cmake_bootstrap_dir}" -if [ -z "${cmake_make_processor}" ]; then +if test -z "${cmake_make_processor}"; then cmake_error 8 "Cannot find appropriate Makefile processor on this system. Please specify one using environment variable MAKE." fi rm -rf "${cmake_bootstrap_dir}/${TMPFILE}" echo "Makefile processor on this system is: ${cmake_make_processor}" -if [ "x${cmake_full_make_flags}" != "x${cmake_make_flags}" ]; then +if test "x${cmake_full_make_flags}" != "x${cmake_make_flags}"; then echo "---------------------------------------------" echo "Makefile processor ${cmake_make_processor} does not support parallel build" echo "---------------------------------------------" @@ -1374,7 +1397,7 @@ else echo "${cmake_cxx_compiler} does not have <ext/stdio_filebuf.h>" fi -if [ -n "${cmake_ccache_enabled}" ]; then +if test -n "${cmake_ccache_enabled}"; then echo "Building CMake with ccache" cmake_c_compiler="ccache ${cmake_c_compiler}" cmake_cxx_compiler="ccache ${cmake_cxx_compiler}" @@ -1476,9 +1499,11 @@ objs="" for a in ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES} ${CMAKE_STD_CXX_SOURCES} ${LexerParser_CXX_SOURCES} ${LexerParser_C_SOURCES} ${KWSYS_CXX_SOURCES} ${KWSYS_C_SOURCES}; do objs="${objs} ${a}.o" done -for a in ${LIBUV_C_SOURCES}; do - objs="${objs} uv-`cmake_obj ${a}`" -done +if test "x${bootstrap_system_libuv}" = "x"; then + for a in ${LIBUV_C_SOURCES}; do + objs="${objs} uv-`cmake_obj ${a}`" + done +fi libs="" @@ -1516,23 +1541,29 @@ else ;; esac fi -uv_c_flags="${uv_c_flags} `cmake_escape "-I${cmake_source_dir}/Utilities/cmlibuv/include"`" -if ${cmake_system_mingw}; then - uv_c_flags="${uv_c_flags} `cmake_escape "-I${cmake_source_dir}/Utilities/cmlibuv/src/win"`" +if test "x${bootstrap_system_libuv}" = "x"; then + uv_c_flags="${uv_c_flags} `cmake_escape "-I${cmake_source_dir}/Utilities/cmlibuv/include"`" + if ${cmake_system_mingw}; then + uv_c_flags="${uv_c_flags} `cmake_escape "-I${cmake_source_dir}/Utilities/cmlibuv/src/win"`" + else + uv_c_flags="${uv_c_flags} `cmake_escape "-I${cmake_source_dir}/Utilities/cmlibuv/src/unix"`" + fi + uv_c_flags="${uv_c_flags} `cmake_escape "-I${cmake_source_dir}/Utilities/cmlibuv/src"`" else - uv_c_flags="${uv_c_flags} `cmake_escape "-I${cmake_source_dir}/Utilities/cmlibuv/src/unix"`" + if test `which pkg-config`; then + uv_c_flags="${uv_c_flags} `pkg-config --cflags libuv`" + fi + libs="${libs} -luv" fi -uv_c_flags="${uv_c_flags} `cmake_escape "-I${cmake_source_dir}/Utilities/cmlibuv/src"`" - -if [ "x${cmake_ansi_cxx_flags}" != "x" ]; then +if test "x${cmake_ansi_cxx_flags}" != "x"; then cmake_cxx_flags="${cmake_ansi_cxx_flags} ${cmake_cxx_flags}" fi -if [ "x${cmake_c_flags}" != "x" ]; then +if test "x${cmake_c_flags}" != "x"; then cmake_c_flags="${cmake_c_flags} " fi -if [ "x${cmake_cxx_flags}" != "x" ]; then +if test "x${cmake_cxx_flags}" != "x"; then cmake_cxx_flags="${cmake_cxx_flags} " fi @@ -1605,11 +1636,13 @@ for a in ${KWSYS_CXX_SOURCES}; do echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile" echo " ${cmake_cxx_compiler} ${cmake_cxx_flags} -DKWSYS_NAMESPACE=cmsys ${src_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile" done -for a in ${LIBUV_C_SOURCES}; do - src=`cmake_escape "${cmake_source_dir}/Utilities/cmlibuv/${a}"` - echo "uv-`cmake_obj ${a}` : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile" - echo " ${cmake_c_compiler} ${cmake_c_flags} ${uv_c_flags} -c ${src} -o uv-`cmake_obj ${a}`" >> "${cmake_bootstrap_dir}/Makefile" -done +if test "x${bootstrap_system_libuv}" = "x"; then + for a in ${LIBUV_C_SOURCES}; do + src=`cmake_escape "${cmake_source_dir}/Utilities/cmlibuv/${a}"` + echo "uv-`cmake_obj ${a}` : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile" + echo " ${cmake_c_compiler} ${cmake_c_flags} ${uv_c_flags} -c ${src} -o uv-`cmake_obj ${a}`" >> "${cmake_bootstrap_dir}/Makefile" + done +fi echo ' rebuild_cache: cd "${cmake_binary_dir}" && "${cmake_source_dir}/bootstrap" @@ -1629,42 +1662,42 @@ set (CMAKE_XDGDATA_DIR "'"${cmake_xdgdata_dir}"'" CACHE PATH "Install location f ' > "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" # Add configuration settings given as command-line options. -if [ "x${cmake_bootstrap_qt_gui}" != "x" ]; then +if test "x${cmake_bootstrap_qt_gui}" != "x"; then echo ' set (BUILD_QtDialog '"${cmake_bootstrap_qt_gui}"' CACHE BOOL "Build Qt dialog for CMake" FORCE) ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" fi -if [ "x${cmake_bootstrap_qt_qmake}" != "x" ]; then +if test "x${cmake_bootstrap_qt_qmake}" != "x"; then echo ' set (QT_QMAKE_EXECUTABLE "'"${cmake_bootstrap_qt_qmake}"'" CACHE FILEPATH "Location of Qt qmake" FORCE) ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" fi -if [ "x${cmake_sphinx_info}" != "x" ]; then +if test "x${cmake_sphinx_info}" != "x"; then echo ' set (SPHINX_INFO "'"${cmake_sphinx_info}"'" CACHE BOOL "Build Info manual with Sphinx" FORCE) ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" fi -if [ "x${cmake_sphinx_man}" != "x" ]; then +if test "x${cmake_sphinx_man}" != "x"; then echo ' set (SPHINX_MAN "'"${cmake_sphinx_man}"'" CACHE BOOL "Build man pages with Sphinx" FORCE) ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" fi -if [ "x${cmake_sphinx_html}" != "x" ]; then +if test "x${cmake_sphinx_html}" != "x"; then echo ' set (SPHINX_HTML "'"${cmake_sphinx_html}"'" CACHE BOOL "Build html help with Sphinx" FORCE) ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" fi -if [ "x${cmake_sphinx_qthelp}" != "x" ]; then +if test "x${cmake_sphinx_qthelp}" != "x"; then echo ' set (SPHINX_QTHELP "'"${cmake_sphinx_qthelp}"'" CACHE BOOL "Build qch help with Sphinx" FORCE) ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" fi -if [ "x${cmake_sphinx_build}" != "x" ]; then +if test "x${cmake_sphinx_build}" != "x"; then echo ' set (SPHINX_EXECUTABLE "'"${cmake_sphinx_build}"'" CACHE FILEPATH "Location of Qt sphinx-build" FORCE) ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" fi -if [ "x${cmake_sphinx_flags}" != "x" ]; then +if test "x${cmake_sphinx_flags}" != "x"; then echo ' set (SPHINX_FLAGS [==['"${cmake_sphinx_flags}"']==] CACHE STRING "Flags to pass to sphinx-build" FORCE) ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" @@ -1674,7 +1707,7 @@ fi # specification of cmake_init_file. ( cd "${cmake_binary_dir}" -if [ -f "${cmake_init_file}" ]; then +if test -f "${cmake_init_file}"; then cat "${cmake_init_file}" >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" fi ) @@ -1682,13 +1715,13 @@ fi echo "---------------------------------------------" # Run make to build bootstrap cmake -if [ "x${cmake_parallel_make}" != "x" ]; then +if test "x${cmake_parallel_make}" != "x"; then ${cmake_make_processor} ${cmake_make_flags} else ${cmake_make_processor} fi RES=$? -if [ "${RES}" -ne "0" ]; then +if test "${RES}" -ne "0"; then cmake_error 9 "Problem while running ${cmake_make_processor}" fi cd "${cmake_binary_dir}" @@ -1707,12 +1740,12 @@ export LDFLAGS # Run bootstrap CMake to configure real CMake cmake_options="-DCMAKE_BOOTSTRAP=1" -if [ -n "${cmake_verbose}" ]; then +if test -n "${cmake_verbose}"; then cmake_options="${cmake_options} -DCMAKE_VERBOSE_MAKEFILE=1" fi "${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}" ${cmake_options} ${cmake_bootstrap_system_libs} "$@" RES=$? -if [ "${RES}" -ne "0" ]; then +if test "${RES}" -ne "0"; then cmake_error 11 "Problem while running initial CMake" fi |