summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FetchContent/TimeStamps.cmake
blob: 33874f9a849a7cb254ebe51ac9780fbe1dd3a361 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
include(FetchContent)

# Do nothing for an update because it would result in always re-running the
# patch step. We want to test that a patch step that only depends on the
# download step is not re-run unnecessarily.
FetchContent_Declare(customCommands
  PREFIX            ${CMAKE_CURRENT_BINARY_DIR}
  DOWNLOAD_COMMAND  "${CMAKE_COMMAND}" -E echo "download executed"
  UPDATE_COMMAND    ""
  PATCH_COMMAND     "${CMAKE_COMMAND}" -E echo "patch executed"
)

set(FETCHCONTENT_QUIET FALSE)
FetchContent_MakeAvailable(customCommands)