[Cmake-commits] CMake branch, next, updated. v3.5.2-1482-g1e1ee6b

Brad King brad.king at kitware.com
Wed May 18 14:56:36 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  1e1ee6b739bde71fccb87f267fb21d74e65fa226 (commit)
       via  bdca68388bd57f8302d3c1d83d691034b7ffa70c (commit)
      from  792442356bfad2d6d4a626c8c6e77016ca169cd7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e1ee6b739bde71fccb87f267fb21d74e65fa226
commit 1e1ee6b739bde71fccb87f267fb21d74e65fa226
Merge: 7924423 bdca683
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 18 14:56:33 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 18 14:56:33 2016 -0400

    Merge topic 'ExternalProject-UPDATE_COMMAND-always' into next
    
    bdca6838 ExternalProject: Always run update step with non-empty UPDATE_COMMAND


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bdca68388bd57f8302d3c1d83d691034b7ffa70c
commit bdca68388bd57f8302d3c1d83d691034b7ffa70c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 18 14:40:33 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 18 14:54:25 2016 -0400

    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.

diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 7dad6e5..ec846b9 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -2030,6 +2030,9 @@ function(_ep_add_update_command name)
 
   if(cmd_set)
     set(work_dir ${source_dir})
+    if(NOT "x${cmd}" STREQUAL "x")
+      set(always 1)
+    endif()
   elseif(cvs_repository)
     if(NOT CVS_EXECUTABLE)
       message(FATAL_ERROR "error: could not find cvs for update of ${name}")
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)

-----------------------------------------------------------------------

Summary of changes:
 Modules/ExternalProject.cmake              |    3 +++
 Tests/ExternalProjectUpdate/CMakeLists.txt |   12 ++++++++++++
 2 files changed, 15 insertions(+)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list