cmake: add "git-update" target for syncing git submodules

it maps the same functionality in autogen.sh

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2016-05-24 12:55:20 +08:00
parent fd66fd915a
commit 34b5ae8fb2

View File

@ -1337,3 +1337,11 @@ add_custom_target(cephfs_testing DEPENDS
cephfs-journal-tool
cephfs-data-scan
cephfs-table-tool)
if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
add_custom_target(
git-update
COMMAND git submodule sync
COMMAND git submodule update --force --init --recursive
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
endif()