blob: 92e08e4f117c028892ce32e2c3bf95e9ead555cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)
|