[Cmake-commits] CMake branch, next, updated. v3.2.3-1397-g99955e0

Brad King brad.king at kitware.com
Tue Jun 2 14:32:18 EDT 2015


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  99955e0dc8228f878d4b934d7526f54b3d92d2e7 (commit)
       via  bc814f981c54da35c5060a888e82b8fd02ff1687 (commit)
       via  19e5e0ba40034c9628afaa0c470b08f161284924 (commit)
       via  14e2c3ad181e2090cb0846fb87743f7543484d08 (commit)
      from  1010c09cf784dc75832736ea5887b0dfaa9dff48 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=99955e0dc8228f878d4b934d7526f54b3d92d2e7
commit 99955e0dc8228f878d4b934d7526f54b3d92d2e7
Merge: 1010c09 bc814f9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jun 2 14:32:17 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jun 2 14:32:17 2015 -0400

    Merge topic 'ExternalProject_init_selected_submodules' into next
    
    bc814f98 Help: Add notes for topic 'ExternalProject_init_selected_submodules'
    19e5e0ba ExternalProject: Add unit tests for GIT_SUBMODULES argument
    14e2c3ad ExternalProject: Initialize only selected git submodules (#15590)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc814f981c54da35c5060a888e82b8fd02ff1687
commit bc814f981c54da35c5060a888e82b8fd02ff1687
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jun 2 14:29:45 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jun 2 14:32:09 2015 -0400

    Help: Add notes for topic 'ExternalProject_init_selected_submodules'

diff --git a/Help/release/dev/ExternalProject_init_selected_submodules.rst b/Help/release/dev/ExternalProject_init_selected_submodules.rst
new file mode 100644
index 0000000..e642c19
--- /dev/null
+++ b/Help/release/dev/ExternalProject_init_selected_submodules.rst
@@ -0,0 +1,7 @@
+ExternalProject_init_selected_submodules
+----------------------------------------
+
+* The :module:`ExternalProject` module :command:`ExternalProject_Add`
+  function ``GIT_SUBMODULES`` option now also limits the set of
+  submodules that are initialized in addition to the prior behavior
+  of limiting the set of submodules that are updated.

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19e5e0ba40034c9628afaa0c470b08f161284924
commit 19e5e0ba40034c9628afaa0c470b08f161284924
Author:     Daniele E. Domenichelli <daniele.domenichelli at iit.it>
AuthorDate: Thu May 28 19:39:19 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jun 2 14:32:09 2015 -0400

    ExternalProject: Add unit tests for GIT_SUBMODULES argument

diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index de62ce7..eef00ea 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -364,6 +364,66 @@ if(do_git_tests)
   )
   set_property(TARGET ${proj} PROPERTY FOLDER "GIT")
 
+  # Unzip/untar the git repository in our source folder so that other
+  # projects below may use it to test git args of ExternalProject_Add
+  #
+  set(proj SetupLocalGITRepositoryWithSubmodules)
+  ExternalProject_Add(${proj}
+    SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/LocalRepositories/GIT-with-submodules
+    URL ${CMAKE_CURRENT_SOURCE_DIR}/gitrepo-sub.tgz
+    BUILD_COMMAND ""
+    CONFIGURE_COMMAND "${GIT_EXECUTABLE}" --version
+    INSTALL_COMMAND ""
+  )
+  set_property(TARGET ${proj}
+    PROPERTY FOLDER "SetupRepos/Local/Deeply/Nested/For/Testing")
+
+  set(local_git_repo "../../LocalRepositories/GIT-with-submodules")
+
+  set(proj TutorialStep1-GIT-with-no-GIT_SUBMODULES)
+  ExternalProject_Add(${proj}
+    GIT_REPOSITORY "${local_git_repo}"
+    CMAKE_GENERATOR "${CMAKE_GENERATOR}"
+    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+               -DWITH_submodule1:BOOL=ON
+               -DWITH_submodule2:BOOL=ON
+    BUILD_COMMAND ""
+    INSTALL_COMMAND ""
+    DEPENDS "SetupLocalGITRepository"
+            "SetupLocalGITRepositoryWithSubmodules"
+  )
+  set_property(TARGET ${proj} PROPERTY FOLDER "GIT")
+
+  set(proj TutorialStep1-GIT-with-empty-GIT_SUBMODULES)
+  ExternalProject_Add(${proj}
+    GIT_REPOSITORY "${local_git_repo}"
+    GIT_SUBMODULES ""
+    CMAKE_GENERATOR "${CMAKE_GENERATOR}"
+    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+               -DWITH_submodule1:BOOL=ON
+               -DWITH_submodule2:BOOL=ON
+    BUILD_COMMAND ""
+    INSTALL_COMMAND ""
+    DEPENDS "SetupLocalGITRepository"
+            "SetupLocalGITRepositoryWithSubmodules"
+  )
+  set_property(TARGET ${proj} PROPERTY FOLDER "GIT")
+
+  set(proj TutorialStep1-GIT-with-some-GIT_SUBMODULES)
+  ExternalProject_Add(${proj}
+    GIT_REPOSITORY "${local_git_repo}"
+    GIT_SUBMODULES "submodules/submodule1"
+    CMAKE_GENERATOR "${CMAKE_GENERATOR}"
+    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+               -DWITH_submodule1:BOOL=ON
+               -DWITH_submodule2:BOOL=OFF
+    BUILD_COMMAND ""
+    INSTALL_COMMAND ""
+    DEPENDS "SetupLocalGITRepository"
+            "SetupLocalGITRepositoryWithSubmodules"
+  )
+  set_property(TARGET ${proj} PROPERTY FOLDER "GIT")
+
 endif()
 
 set(do_hg_tests 0)
diff --git a/Tests/ExternalProject/gitrepo-sub.tgz b/Tests/ExternalProject/gitrepo-sub.tgz
new file mode 100644
index 0000000..72c8eb1
Binary files /dev/null and b/Tests/ExternalProject/gitrepo-sub.tgz differ

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14e2c3ad181e2090cb0846fb87743f7543484d08
commit 14e2c3ad181e2090cb0846fb87743f7543484d08
Author:     Silvio Traversaro <silvio.traversaro at iit.it>
AuthorDate: Thu May 28 16:22:28 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jun 2 14:31:26 2015 -0400

    ExternalProject: Initialize only selected git submodules (#15590)
    
    Honor the GIT_SUBMODULES option added by commit v3.0.0-rc1~92^2
    (ExternalProject: Add option GIT_SUBMODULES, 2014-01-09) during the
    'git submodule init' step to avoid initalizing all modules since we
    are only going to update the specified subset anyway.  This will
    be useful for project repositories that have many submodules
    (e.g. https://github.com/boostorg/boost).
    
    Reviewed-by: Daniele E. Domenichelli <daniele.domenichelli at iit.it>

diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 11a24b8..eee1841 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -529,7 +529,7 @@ if(error_code)
 endif()
 
 execute_process(
-  COMMAND \"${git_EXECUTABLE}\" submodule init
+  COMMAND \"${git_EXECUTABLE}\" submodule init ${git_submodules}
   WORKING_DIRECTORY \"${work_dir}/${src_name}\"
   RESULT_VARIABLE error_code
   )

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

Summary of changes:
 .../ExternalProject_init_selected_submodules.rst   |    7 +++
 Modules/ExternalProject.cmake                      |    2 +-
 Tests/ExternalProject/CMakeLists.txt               |   60 ++++++++++++++++++++
 Tests/ExternalProject/gitrepo-sub.tgz              |  Bin 0 -> 1833 bytes
 4 files changed, 68 insertions(+), 1 deletion(-)
 create mode 100644 Help/release/dev/ExternalProject_init_selected_submodules.rst
 create mode 100644 Tests/ExternalProject/gitrepo-sub.tgz


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list