summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FetchContent/MultiCommand.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/FetchContent/MultiCommand.cmake')
-rw-r--r--Tests/RunCMake/FetchContent/MultiCommand.cmake18
1 files changed, 18 insertions, 0 deletions
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)