From 79410eeb1f32974aaf1e95aef439a4709fafbc8e Mon Sep 17 00:00:00 2001 From: Ilya Kulakov Date: Tue, 26 Apr 2016 18:50:38 -0400 Subject: ExternalProject: Initialize Git submodules recursively and on update (#16083) --- Help/release/dev/ExternalProject-git-recursive-init.rst | 7 +++++++ Modules/ExternalProject.cmake | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 Help/release/dev/ExternalProject-git-recursive-init.rst diff --git a/Help/release/dev/ExternalProject-git-recursive-init.rst b/Help/release/dev/ExternalProject-git-recursive-init.rst new file mode 100644 index 0000000..1ebcced --- /dev/null +++ b/Help/release/dev/ExternalProject-git-recursive-init.rst @@ -0,0 +1,7 @@ +ExternalProject-git-recursive-init +---------------------------------- + +* The :module:`ExternalProject` module learned to initialize Git submodules + recursively and also to initialize new submodules on updates. Use the + ``GIT_SUBMODULES`` option to restrict which submodules are initalized and + updated. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 9cc8a20..7dad6e5 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -587,7 +587,7 @@ if(error_code) endif() execute_process( - COMMAND \"${git_EXECUTABLE}\" \${git_options} submodule update --recursive ${git_submodules} + COMMAND \"${git_EXECUTABLE}\" \${git_options} submodule update --recursive --init ${git_submodules} WORKING_DIRECTORY \"${work_dir}/${src_name}\" RESULT_VARIABLE error_code ) @@ -833,7 +833,7 @@ if(error_code OR is_remote_ref OR NOT (\"\${tag_sha}\" STREQUAL \"\${head_sha}\" endif() execute_process( - COMMAND \"${git_EXECUTABLE}\" submodule update --recursive ${git_submodules} + COMMAND \"${git_EXECUTABLE}\" submodule update --recursive --init ${git_submodules} WORKING_DIRECTORY \"${work_dir}/${src_name}\" RESULT_VARIABLE error_code ) -- cgit v0.12