diff options
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 106 |
1 files changed, 55 insertions, 51 deletions
@@ -289,10 +289,10 @@ CMAKE_CXX_SOURCES="\ cmBuildCommand \ cmCMakeMinimumRequired \ cmCMakePath \ + cmCMakePathCommand \ cmCMakePolicyCommand \ cmCPackPropertiesGenerator \ cmCacheManager \ - cmCheckCustomOutputs \ cmCommand \ cmCommandArgumentParserHelper \ cmCommands \ @@ -307,6 +307,7 @@ CMAKE_CXX_SOURCES="\ cmContinueCommand \ cmCoreTryCompile \ cmCreateTestSourceList \ + cmCryptoHash \ cmCustomCommand \ cmCustomCommandGenerator \ cmCustomCommandLines \ @@ -412,6 +413,8 @@ CMAKE_CXX_SOURCES="\ cmProjectCommand \ cmPropertyDefinition \ cmPropertyMap \ + cmGccDepfileLexerHelper \ + cmGccDepfileReader \ cmReturnCommand \ cmRulePlaceholderExpander \ cmRuntimeDependencyArchive \ @@ -452,6 +455,7 @@ CMAKE_CXX_SOURCES="\ cmTest \ cmTestGenerator \ cmTimestamp \ + cmTransformDepfile \ cmTryCompileCommand \ cmTryRunCommand \ cmUnsetCommand \ @@ -491,6 +495,7 @@ LexerParser_CXX_SOURCES="\ cmCommandArgumentParser \ cmExprLexer \ cmExprParser \ + cmGccDepfileLexer \ " LexerParser_C_SOURCES="\ @@ -535,6 +540,18 @@ KWSYS_FILES="\ SystemTools.hxx \ Terminal.h" +LIBRHASH_C_SOURCES="\ + librhash/algorithms.c \ + librhash/byte_order.c \ + librhash/hex.c \ + librhash/md5.c \ + librhash/rhash.c \ + librhash/sha1.c \ + librhash/sha256.c \ + librhash/sha3.c \ + librhash/sha512.c \ + " + if ${cmake_system_mingw}; then LIBUV_C_SOURCES="\ src/fs-poll.c \ @@ -927,11 +944,10 @@ while test $# != 0; do done # Make sure the generator is valid -if test "${cmake_bootstrap_generator}" != "MSYS Makefiles" -a \ - "${cmake_bootstrap_generator}" != "Unix Makefiles" -a \ - "${cmake_bootstrap_generator}" != "Ninja"; then - cmake_error 10 "Invalid generator: ${cmake_bootstrap_generator}" -fi +case "${cmake_bootstrap_generator}" in + 'MSYS Makefiles'|'Unix Makefiles'|'Ninja') ;; + *) cmake_error 10 "Invalid generator: ${cmake_bootstrap_generator}" +esac # If verbose, display some information about bootstrap if test -n "${cmake_verbose}"; then @@ -1012,7 +1028,6 @@ cmake_ld_flags=${LDFLAGS} # Add generator-specific files if test "${cmake_bootstrap_generator}" = "Ninja"; then CMAKE_CXX_SOURCES="${CMAKE_CXX_SOURCES} \ - cmCryptoHash \ cmFortranParserImpl \ cmGlobalNinjaGenerator \ cmLocalNinjaGenerator \ @@ -1033,32 +1048,21 @@ if test "${cmake_bootstrap_generator}" = "Ninja"; then src/lib_json/json_value.cpp \ src/lib_json/json_writer.cpp \ " - - LIBRHASH_C_SOURCES="\ - librhash/algorithms.c \ - librhash/byte_order.c \ - librhash/hex.c \ - librhash/md5.c \ - librhash/rhash.c \ - librhash/sha1.c \ - librhash/sha256.c \ - librhash/sha3.c \ - librhash/sha512.c \ - " else CMAKE_CXX_SOURCES="${CMAKE_CXX_SOURCES} \ cmDepends \ cmDependsC \ + cmDependsCompiler \ cmGlobalUnixMakefileGenerator3 \ cmLocalUnixMakefileGenerator3 \ cmMakefileExecutableTargetGenerator \ cmMakefileLibraryTargetGenerator \ cmMakefileTargetGenerator \ cmMakefileUtilityTargetGenerator \ + cmProcessTools \ " JSONCPP_CXX_SOURCES= - LIBRHASH_C_SOURCES= fi # Add Cygwin-specific flags @@ -1191,8 +1195,8 @@ for std in 11 99 90; do for compiler in ${cmake_c_compilers}; do for std_flag in '' $std_flags; do for thread_flag in '' $thread_flags; do - echo "Checking whether '${compiler} ${cmake_c_flags} ${std_flag} ${thread_flag}' works." >> cmake_bootstrap.log 2>&1 - if cmake_try_run "${compiler}" "${cmake_c_flags} ${std_flag} ${thread_flag}" \ + echo "Checking whether '${compiler} ${cmake_c_flags} ${cmake_ld_flags} ${std_flag} ${thread_flag}' works." >> cmake_bootstrap.log 2>&1 + if cmake_try_run "${compiler}" "${cmake_c_flags} ${cmake_ld_flags} ${std_flag} ${thread_flag}" \ "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then cmake_c_compiler="${compiler}" cmake_c_flags="${cmake_c_flags} ${std_flag} ${thread_flag}" @@ -1312,8 +1316,8 @@ for std in 17 14 11; do for compiler in ${cmake_cxx_compilers}; do for std_flag in '' $std_flags; do for thread_flag in '' $thread_flags; do - echo "Checking whether '${compiler} ${cmake_cxx_flags} ${std_flag} ${thread_flag}' works." >> cmake_bootstrap.log 2>&1 - if cmake_try_run "${compiler}" "${cmake_cxx_flags} ${std_flag} ${thread_flag}" \ + echo "Checking whether '${compiler} ${cmake_cxx_flags} ${cmake_ld_flags} ${std_flag} ${thread_flag}' works." >> cmake_bootstrap.log 2>&1 + if cmake_try_run "${compiler}" "${cmake_cxx_flags} ${cmake_ld_flags} ${std_flag} ${thread_flag}" \ "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then cmake_cxx_compiler="${compiler}" cmake_cxx_flags="${cmake_cxx_flags} ${std_flag} ${thread_flag} " @@ -1341,8 +1345,8 @@ cmake_cxx_features="make_unique filesystem" for feature in ${cmake_cxx_features}; do eval "cmake_have_cxx_${feature}=0" - echo "Checking whether '${cmake_cxx_compiler} ${cmake_cxx_flags}' supports '${feature}'." >> cmake_bootstrap.log 2>&1 - if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags}" \ + echo "Checking whether '${cmake_cxx_compiler} ${cmake_cxx_flags} ${cmake_ld_flags}' supports '${feature}'." >> cmake_bootstrap.log 2>&1 + if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags} ${cmake_ld_flags}" \ "${cmake_source_dir}/Source/Checks/cm_cxx_${feature}.cxx" >> cmake_bootstrap.log 2>&1; then eval "cmake_have_cxx_${feature}=1" fi @@ -1449,7 +1453,7 @@ KWSYS_CXX_HAS_UTIMES=0 KWSYS_SYSTEMTOOLS_USE_TRANSLATION_MAP=1 if cmake_try_run "${cmake_cxx_compiler}" \ - "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_SETENV" \ + "${cmake_cxx_flags} ${cmake_ld_flags} -DTEST_KWSYS_CXX_HAS_SETENV" \ "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then KWSYS_CXX_HAS_SETENV=1 echo "${cmake_cxx_compiler} has setenv" @@ -1458,7 +1462,7 @@ else fi if cmake_try_run "${cmake_cxx_compiler}" \ - "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_UNSETENV" \ + "${cmake_cxx_flags} ${cmake_ld_flags} -DTEST_KWSYS_CXX_HAS_UNSETENV" \ "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then KWSYS_CXX_HAS_UNSETENV=1 echo "${cmake_cxx_compiler} has unsetenv" @@ -1467,7 +1471,7 @@ else fi if cmake_try_run "${cmake_cxx_compiler}" \ - "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H" \ + "${cmake_cxx_flags} ${cmake_ld_flags} -DTEST_KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H" \ "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=1 echo "${cmake_cxx_compiler} has environ in stdlib.h" @@ -1476,7 +1480,7 @@ else fi if cmake_try_run "${cmake_cxx_compiler}" \ - "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_WSTRING" \ + "${cmake_cxx_flags} ${cmake_ld_flags} -DTEST_KWSYS_STL_HAS_WSTRING" \ "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then KWSYS_STL_HAS_WSTRING=1 echo "${cmake_cxx_compiler} has stl wstring" @@ -1485,7 +1489,7 @@ else fi if cmake_try_run "${cmake_cxx_compiler}" \ - "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H" \ + "${cmake_cxx_flags} ${cmake_ld_flags} -DTEST_KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H" \ "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H=1 echo "${cmake_cxx_compiler} has <ext/stdio_filebuf.h>" @@ -1628,17 +1632,17 @@ if test "x${bootstrap_system_libuv}" = "x"; then objs="${objs} uv-`cmake_obj ${a}`" done fi +if test "x${bootstrap_system_librhash}" = "x"; then + for a in ${LIBRHASH_C_SOURCES}; do + objs="${objs} rhash-`cmake_obj ${a}`" + done +fi if test "${cmake_bootstrap_generator}" = "Ninja"; then if test "x${bootstrap_system_jsoncpp}" = "x"; then for a in ${JSONCPP_CXX_SOURCES}; do objs="${objs} jsoncpp-`cmake_obj ${a}`" done fi - if test "x${bootstrap_system_librhash}" = "x"; then - for a in ${LIBRHASH_C_SOURCES}; do - objs="${objs} rhash-`cmake_obj ${a}`" - done - fi fi libs="" @@ -1698,6 +1702,15 @@ else libs="${libs} -luv" fi +if test "x${bootstrap_system_librhash}" != "x"; then + if test `which pkg-config`; then + use_librhash_flags="`pkg-config --cflags librhash`" + cmake_c_flags="${cmake_c_flags} ${use_librhash_flags}" + cmake_cxx_flags="${cmake_cxx_flags} ${use_librhash_flags}" + fi + libs="${libs} -lrhash" +fi + if test "${cmake_bootstrap_generator}" = "Ninja"; then jsoncpp_cxx_flags= if test "x${bootstrap_system_jsoncpp}" = "x"; then @@ -1709,15 +1722,6 @@ if test "${cmake_bootstrap_generator}" = "Ninja"; then fi libs="${libs} -ljsoncpp" fi - - if test "x${bootstrap_system_librhash}" != "x"; then - if test `which pkg-config`; then - use_librhash_flags="`pkg-config --cflags librhash`" - cmake_c_flags="${cmake_c_flags} ${use_librhash_flags}" - cmake_cxx_flags="${cmake_cxx_flags} ${use_librhash_flags}" - fi - libs="${libs} -lrhash" - fi fi if test "x${cmake_ansi_cxx_flags}" != "x"; then @@ -1841,6 +1845,12 @@ if test "x${bootstrap_system_libuv}" = "x"; then write_source_rule "c" "uv-`cmake_obj ${a}`" "${src}" "${uv_c_flags}" done fi +if test "x${bootstrap_system_librhash}" = "x"; then + for a in ${LIBRHASH_C_SOURCES}; do + src=`cmake_escape_artifact "${cmake_source_dir}/Utilities/cmlibrhash/${a}"` + write_source_rule "c" "rhash-`cmake_obj ${a}`" "${src}" "" + done +fi if test "${cmake_bootstrap_generator}" = "Ninja"; then if test "x${bootstrap_system_jsoncpp}" = "x"; then for a in ${JSONCPP_CXX_SOURCES}; do @@ -1848,12 +1858,6 @@ if test "${cmake_bootstrap_generator}" = "Ninja"; then write_source_rule "cxx" "jsoncpp-`cmake_obj ${a}`" "${src}" "${jsoncpp_cxx_flags}" done fi - if test "x${bootstrap_system_librhash}" = "x"; then - for a in ${LIBRHASH_C_SOURCES}; do - src=`cmake_escape_artifact "${cmake_source_dir}/Utilities/cmlibrhash/${a}"` - write_source_rule "c" "rhash-`cmake_obj ${a}`" "${src}" "" - done - fi fi if test "${cmake_bootstrap_generator}" = "Ninja"; then echo " |