diff options
author | Brad King <brad.king@kitware.com> | 2016-05-18 18:40:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-18 18:54:25 (GMT) |
commit | bdca68388bd57f8302d3c1d83d691034b7ffa70c (patch) | |
tree | 20f34ad26c73dbc68f43ac7891d2be769df091f1 /Tests | |
parent | 4f17baccadf5f1c74ac2bbcdf07b020d2f9df628 (diff) | |
download | CMake-bdca68388bd57f8302d3c1d83d691034b7ffa70c.zip CMake-bdca68388bd57f8302d3c1d83d691034b7ffa70c.tar.gz CMake-bdca68388bd57f8302d3c1d83d691034b7ffa70c.tar.bz2 |
ExternalProject: Always run update step with non-empty UPDATE_COMMAND
The purpose of the `update` step is to run an update on each build
(subject to `UPDATE_DISCONNECTED`). This is done for version-controlled
source directories. We should do it for a custom `UPDATE_COMMAND` too.
In particular, when `UPDATE_DISCONNECTED` is used we expect the
`skip-update` step to exist.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/ExternalProjectUpdate/CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/ExternalProjectUpdate/CMakeLists.txt b/Tests/ExternalProjectUpdate/CMakeLists.txt index fbb3388..dbf26c8 100644 --- a/Tests/ExternalProjectUpdate/CMakeLists.txt +++ b/Tests/ExternalProjectUpdate/CMakeLists.txt @@ -21,6 +21,18 @@ set_property(DIRECTORY PROPERTY EP_BASE ${base}) set_property(DIRECTORY PROPERTY EP_STEP_TARGETS configure build test) set_property(DIRECTORY PROPERTY EP_INDEPENDENT_STEP_TARGETS update) +ExternalProject_Add(TestUpdateCommand + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} + UPDATE_COMMAND ${CMAKE_COMMAND} -E echo update + UPDATE_DISCONNECTED 1 + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + INDEPENDENT_STEP_TARGETS update + ) +add_custom_target(TestUpdateCommandDriver ALL) +add_dependencies(TestUpdateCommandDriver TestUpdateCommand-update) + set(do_git_tests 0) if(GIT_EXECUTABLE) |