]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: add "git-update" target for syncing git submodules 9300/head
authorKefu Chai <kchai@redhat.com>
Tue, 24 May 2016 04:55:20 +0000 (12:55 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 24 May 2016 20:17:42 +0000 (04:17 +0800)
it maps the same functionality in autogen.sh

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/CMakeLists.txt

index 70d2c7ae831e02f98220a30506ecc4e74a441f9e..07bc0dd761d7896f2841425ad990155e58642bcd 100644 (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()