From 124243c0eb6977690d4f99f17e8019c748af3668 Mon Sep 17 00:00:00 2001 From: "Daniele E. Domenichelli" Date: Thu, 28 May 2015 19:39:19 +0200 Subject: [PATCH] ExternalProject: Add unit tests for GIT_SUBMODULES argument --- Tests/ExternalProject/CMakeLists.txt | 60 ++++++++++++++++++++++++++ Tests/ExternalProject/gitrepo-sub.tgz | Bin 0 -> 1911 bytes 2 files changed, 60 insertions(+) create mode 100644 Tests/ExternalProject/gitrepo-sub.tgz diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt index de62ce7ac..b5041c7f8 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 TS1-GIT-no-GIT_SUBMODULES) + ExternalProject_Add(${proj} + GIT_REPOSITORY "${local_git_repo}" + CMAKE_GENERATOR "${CMAKE_GENERATOR}" + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= + -DWITH_m1:BOOL=ON + -DWITH_m2:BOOL=ON + BUILD_COMMAND "" + INSTALL_COMMAND "" + DEPENDS "SetupLocalGITRepository" + "SetupLocalGITRepositoryWithSubmodules" + ) + set_property(TARGET ${proj} PROPERTY FOLDER "GIT") + + set(proj TS1-GIT-empty-GIT_SUBMODULES) + ExternalProject_Add(${proj} + GIT_REPOSITORY "${local_git_repo}" + GIT_SUBMODULES "" + CMAKE_GENERATOR "${CMAKE_GENERATOR}" + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= + -DWITH_m1:BOOL=ON + -DWITH_m2:BOOL=ON + BUILD_COMMAND "" + INSTALL_COMMAND "" + DEPENDS "SetupLocalGITRepository" + "SetupLocalGITRepositoryWithSubmodules" + ) + set_property(TARGET ${proj} PROPERTY FOLDER "GIT") + + set(proj TS1-GIT-some-GIT_SUBMODULES) + ExternalProject_Add(${proj} + GIT_REPOSITORY "${local_git_repo}" + GIT_SUBMODULES "m/m1" + CMAKE_GENERATOR "${CMAKE_GENERATOR}" + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= + -DWITH_m1:BOOL=ON + -DWITH_m2: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 0000000000000000000000000000000000000000..c0b5360174893ff32cd7e69d24baf168205f74e9 GIT binary patch literal 1911 zcmV--2Z;C|iwFP~X>e5l1MQj%P*Z0X$0HUiSp;<33h3IaB9%(QedT2bA3zmB5R|ka zh**7f^M&fK|Q?&M_h|IYc&cfP1;)-Qms%bWa_ZWaVBqG>;MI5g8 z;3238!(lOwiEti_U@$J>L88a;WgIaxEMbBmo`%+|6%TlBp!c6p)DHR^6iX z9$tT3#0>%cUBLbHr}Zj>vnIjA>o3AF4CwC)9;m;OAT`XR`>+cv#vh=+SnQy`7#E{F z2!3?e1M`&Y9|ze*7Kl+9ibz#bk&1+IR3X7tG6llDV1|NM{O66}}yqg?$b2KnC=#LWzk<}PlW zx#xIhd&8~^4M86!jDM}*Y=AH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