diff options
-rw-r--r-- | Modules/ExternalProject.cmake | 2 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 17 | ||||
-rw-r--r-- | Tests/CMakeLists.txt | 23 | ||||
-rw-r--r-- | Tests/ExternalProject/CMakeLists.txt | 12 | ||||
-rw-r--r-- | Tests/Qt4Autogen/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/Qt5Autogen/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/configure_file/RerunCMake.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/configure_file/RerunCMake/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/configure_file/RunCMakeTest.cmake | 4 |
10 files changed, 45 insertions, 30 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index c69a2ee..5bac0d8 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1096,7 +1096,7 @@ function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git list(APPEND git_clone_options --progress) endif() foreach(config IN LISTS git_config) - list(APPEND git_clone_options --config ${config}) + list(APPEND git_clone_options --config \"${config}\") endforeach() if(NOT ${git_remote_name} STREQUAL "origin") list(APPEND git_clone_options --origin \"${git_remote_name}\") diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index fe104ed..6891db0 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,7 +1,7 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 17) -set(CMake_VERSION_PATCH 20200217) +set(CMake_VERSION_PATCH 20200218) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 90c9ef0..d123830 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -343,19 +343,18 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() const std::string& binDir = lg.GetBinaryDirectory(); // CMake must rerun if a byproduct is missing. - { - cmakefileStream << "# Byproducts of CMake generate step:\n" - << "set(CMAKE_MAKEFILE_PRODUCTS\n"; - for (std::string const& outfile : lg.GetMakefile()->GetOutputFiles()) { + cmakefileStream << "# Byproducts of CMake generate step:\n" + << "set(CMAKE_MAKEFILE_PRODUCTS\n"; + + // add in any byproducts and all the directory information files + std::string tmpStr; + for (const auto& localGen : this->LocalGenerators) { + for (std::string const& outfile : + localGen->GetMakefile()->GetOutputFiles()) { cmakefileStream << " \"" << lg.MaybeConvertToRelativePath(binDir, outfile) << "\"\n"; } - } - - // add in all the directory information files - std::string tmpStr; - for (const auto& localGen : this->LocalGenerators) { tmpStr = cmStrCat(localGen->GetCurrentBinaryDirectory(), "/CMakeFiles/CMakeDirectoryInformation.cmake"); cmakefileStream << " \"" diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 6fad175..33c7514 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3423,17 +3423,6 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH set_tests_properties ( KDELibsAlpha1 PROPERTIES TIMEOUT 5400) endif() - # If this is not an in-source build, provide a target to wipe out - # all the test build directories. - if(NOT EXISTS "${CMake_BINARY_DIR}/CMakeLists.txt") - configure_file(${CMake_SOURCE_DIR}/Tests/test_clean.cmake.in - ${CMake_BINARY_DIR}/Tests/test_clean.cmake @ONLY) - add_custom_target(test_clean - COMMAND ${CMAKE_COMMAND} -P ${CMake_BINARY_DIR}/Tests/test_clean.cmake - COMMENT "Removing test build directories." - ) - endif() - # Define a set of "contract" tests, each activated by a cache entry # named "CMake_TEST_CONTRACT_<project>". For each Contract test, # the project should provide a directory with a CMakeLists.txt file @@ -3508,4 +3497,16 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH if(NOT CMake_TEST_EXTERNAL_CMAKE) add_subdirectory(CMakeTests) endif() + + # If this is not an in-source build, provide a target to wipe out + # all the test build directories. This must come at the end after + # all the above logic has finished adding to TEST_BUILD_DIRS + if(NOT EXISTS "${CMake_BINARY_DIR}/CMakeLists.txt") + configure_file(${CMake_SOURCE_DIR}/Tests/test_clean.cmake.in + ${CMake_BINARY_DIR}/Tests/test_clean.cmake @ONLY) + add_custom_target(test_clean + COMMAND ${CMAKE_COMMAND} -P ${CMake_BINARY_DIR}/Tests/test_clean.cmake + COMMENT "Removing test build directories." + ) + endif() endif() diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt index ef81169..450e7e5 100644 --- a/Tests/ExternalProject/CMakeLists.txt +++ b/Tests/ExternalProject/CMakeLists.txt @@ -380,7 +380,9 @@ if(do_git_tests) set(proj TutorialStep1-GIT-config) ExternalProject_Add(${proj} GIT_REPOSITORY "${local_git_repo}" - GIT_CONFIG core.eol=lf core.autocrlf=input + GIT_CONFIG core.eol=lf + core.autocrlf=input + "http.extraheader=AUTHORIZATION: bearer --unsupportedOption" CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> INSTALL_COMMAND "" @@ -661,11 +663,19 @@ if(do_git_tests) add_test(TutorialStep1-GIT-bytag "${binary_base}/TutorialStep1-GIT-bytag/Tutorial" 99) + add_test(TutorialStep1-GIT-bytag-withsubmodules + "${binary_base}/TutorialStep1-GIT-bytag-withsubmodules/Tutorial" 99) + add_test(TutorialStep1-GIT-shallow-master "${binary_base}/TutorialStep1-GIT-shallow-master/Tutorial" 98) add_test(TutorialStep1-GIT-master "${binary_base}/TutorialStep1-GIT-master/Tutorial" 98) + + if(NOT git_version VERSION_LESS 1.7.7) + add_test(TutorialStep1-GIT-config + "${binary_base}/TutorialStep1-GIT-config/Tutorial" 98) + endif() endif() diff --git a/Tests/Qt4Autogen/CMakeLists.txt b/Tests/Qt4Autogen/CMakeLists.txt index 68b885b..e7f1ae3 100644 --- a/Tests/Qt4Autogen/CMakeLists.txt +++ b/Tests/Qt4Autogen/CMakeLists.txt @@ -7,3 +7,5 @@ ADD_AUTOGEN_TEST(DefinesTest) # Common tests include("../QtAutogen/Tests.cmake") + +set(TEST_BUILD_DIRS "${TEST_BUILD_DIRS}" PARENT_SCOPE) diff --git a/Tests/Qt5Autogen/CMakeLists.txt b/Tests/Qt5Autogen/CMakeLists.txt index 49d33cc..df4927a 100644 --- a/Tests/Qt5Autogen/CMakeLists.txt +++ b/Tests/Qt5Autogen/CMakeLists.txt @@ -4,3 +4,5 @@ include("../QtAutogen/TestMacros.cmake") # Common tests include("../QtAutogen/Tests.cmake") + +set(TEST_BUILD_DIRS "${TEST_BUILD_DIRS}" PARENT_SCOPE) diff --git a/Tests/RunCMake/configure_file/RerunCMake.cmake b/Tests/RunCMake/configure_file/RerunCMake.cmake index 890cc1f..98387d0 100644 --- a/Tests/RunCMake/configure_file/RerunCMake.cmake +++ b/Tests/RunCMake/configure_file/RerunCMake.cmake @@ -1,8 +1,4 @@ message("Running CMake on RerunCMake") # write to stderr if cmake reruns -configure_file( - "${CMAKE_CURRENT_BINARY_DIR}/ConfigureFileInput.txt.in" - "${CMAKE_CURRENT_BINARY_DIR}/ConfigureFileOutput.txt" - @ONLY - ) +add_subdirectory(RerunCMake) # make sure CMakeCache.txt is newer than ConfigureFileOutput.txt execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) diff --git a/Tests/RunCMake/configure_file/RerunCMake/CMakeLists.txt b/Tests/RunCMake/configure_file/RerunCMake/CMakeLists.txt new file mode 100644 index 0000000..c9681c7 --- /dev/null +++ b/Tests/RunCMake/configure_file/RerunCMake/CMakeLists.txt @@ -0,0 +1,5 @@ +configure_file( + "${CMAKE_CURRENT_BINARY_DIR}/ConfigureFileInput.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/ConfigureFileOutput.txt" + @ONLY + ) diff --git a/Tests/RunCMake/configure_file/RunCMakeTest.cmake b/Tests/RunCMake/configure_file/RunCMakeTest.cmake index de14468..32a0770 100644 --- a/Tests/RunCMake/configure_file/RunCMakeTest.cmake +++ b/Tests/RunCMake/configure_file/RunCMakeTest.cmake @@ -22,7 +22,7 @@ if(RunCMake_GENERATOR MATCHES "Make") set(RunCMake_TEST_NO_CLEAN 1) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") - set(in_conf "${RunCMake_TEST_BINARY_DIR}/ConfigureFileInput.txt.in") + set(in_conf "${RunCMake_TEST_BINARY_DIR}/RerunCMake/ConfigureFileInput.txt.in") file(WRITE "${in_conf}" "1") message(STATUS "RerunCMake: first configuration...") @@ -42,7 +42,7 @@ if(RunCMake_GENERATOR MATCHES "Make") run_cmake_command(RerunCMake-nowork ${CMAKE_COMMAND} --build .) message(STATUS "RerunCMake: remove configure_file output...") - file(REMOVE "${RunCMake_TEST_BINARY_DIR}/ConfigureFileOutput.txt") + file(REMOVE "${RunCMake_TEST_BINARY_DIR}/RerunCMake/ConfigureFileOutput.txt") run_cmake_command(RerunCMake-rerun ${CMAKE_COMMAND} --build .) run_cmake_command(RerunCMake-nowork ${CMAKE_COMMAND} --build .) |