diff options
author | Craig Scott <craig.scott@crascit.com> | 2021-02-18 12:39:13 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-02-18 12:39:23 (GMT) |
commit | eefcf2e0a6ed07fd288314d91eaa4a96d9da6ec8 (patch) | |
tree | a9d729e609683132c56ad02cdcffc71cfeb1368f | |
parent | 50fc9d5b45a7dcbb11152ea77b2d47c66e277265 (diff) | |
parent | bd876f3849663959f4b8b7c7f2052ecbb53b8500 (diff) | |
download | CMake-eefcf2e0a6ed07fd288314d91eaa4a96d9da6ec8.zip CMake-eefcf2e0a6ed07fd288314d91eaa4a96d9da6ec8.tar.gz CMake-eefcf2e0a6ed07fd288314d91eaa4a96d9da6ec8.tar.bz2 |
Merge topic 'fetchcontent-patch-step-typo' into release-3.20
bd876f3849 FetchContent: Restore patch command support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5822
-rw-r--r-- | Modules/ExternalProject.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/FetchContent/MultiCommand-stdout.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/FetchContent/MultiCommand.cmake | 18 | ||||
-rw-r--r-- | Tests/RunCMake/FetchContent/RunCMakeTest.cmake | 1 |
4 files changed, 26 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 2b413c2..4a9809b 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -3897,7 +3897,7 @@ function(_ep_do_preconfigure_steps_now name) # Once any step has to run, all later steps have to be run too set(need_to_run FALSE) - foreach(step IN ITEMS download update parse) + foreach(step IN ITEMS download update patch) if(update_disconnected AND "${step}" STREQUAL "update") continue() endif() diff --git a/Tests/RunCMake/FetchContent/MultiCommand-stdout.txt b/Tests/RunCMake/FetchContent/MultiCommand-stdout.txt new file mode 100644 index 0000000..7f2c0f8 --- /dev/null +++ b/Tests/RunCMake/FetchContent/MultiCommand-stdout.txt @@ -0,0 +1,6 @@ +.* *download 1 +.* *download 2 +.* *update 1 +.* *update 2 +.* *patch 1 +.* *patch 2 diff --git a/Tests/RunCMake/FetchContent/MultiCommand.cmake b/Tests/RunCMake/FetchContent/MultiCommand.cmake new file mode 100644 index 0000000..92e08e4 --- /dev/null +++ b/Tests/RunCMake/FetchContent/MultiCommand.cmake @@ -0,0 +1,18 @@ +include(FetchContent) + +# Verify COMMAND keyword is recognised after various *_COMMAND options +FetchContent_Declare(multiCommand + DOWNLOAD_COMMAND "${CMAKE_COMMAND}" -E echo "download 1" + COMMAND "${CMAKE_COMMAND}" -E echo "download 2" + UPDATE_COMMAND "${CMAKE_COMMAND}" -E echo "update 1" + COMMAND "${CMAKE_COMMAND}" -E echo "update 2" + PATCH_COMMAND "${CMAKE_COMMAND}" -E echo "patch 1" + COMMAND "${CMAKE_COMMAND}" -E echo "patch 2" +) + +# Force all steps to be re-run by removing timestamps, scripts, etc. from any +# previous run +file(REMOVE_RECURSE "${FETCHCONTENT_BASE_DIR}/multiCommand-subbuild") + +set(FETCHCONTENT_QUIET FALSE) +FetchContent_MakeAvailable(multiCommand) diff --git a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake index b497382..13013fa 100644 --- a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake +++ b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake @@ -2,6 +2,7 @@ include(RunCMake) unset(RunCMake_TEST_NO_CLEAN) +run_cmake(MultiCommand) run_cmake(MissingDetails) run_cmake(DirectIgnoresDetails) run_cmake(FirstDetailsWin) |