summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-09 13:54:27 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-02-09 13:54:38 (GMT)
commit419eb2349a5cf8917e0ed34ccb510619fb2612b0 (patch)
treef078be6e12ba95aa5b7d7643e692e38615d45911 /Tests
parentd7ee1145a1d15987e30636a4d2cbee56d0d4f1cd (diff)
parent7b23fd6c1b91e32e20564864114ffd5b3732032a (diff)
downloadCMake-419eb2349a5cf8917e0ed34ccb510619fb2612b0.zip
CMake-419eb2349a5cf8917e0ed34ccb510619fb2612b0.tar.gz
CMake-419eb2349a5cf8917e0ed34ccb510619fb2612b0.tar.bz2
Merge topic 'test-vcs'
7b23fd6c1b Tests: Run CTest.UpdateBZR tests only if explicitly enabled 7cf5355d5e Tests: Add cache entries to control ExternalProject test VCS tools c8b29dc5b9 Tests: Add cache entries to control existence of CTest.Update* tests a70864e300 Tests: Make condition for CTest.UpdateCVS match pattern of other tools 1972a75536 Tests: Drop CTestUpdate.BZR test check for xmloutput plugin f2566f6416 Tests: Drop unnecessary check for FindCVS module 530242576c Tests: Remove always-true condition enabling CTest.Update* tests 4e88a4228e Tests: Remove unused CVS tool discovery Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6956
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt245
-rw-r--r--Tests/ExternalProject/CMakeLists.txt135
2 files changed, 169 insertions, 211 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index fa6cd96..8ebe5ed 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -294,26 +294,6 @@ if(BUILD_TESTING)
mark_as_advanced(CTEST_TEST_CTEST)
endif ()
- # Should tests that use CVS be run?
- #
- set(do_cvs_tests 0)
-
- if(EXISTS ${CMAKE_ROOT}/Modules/FindCVS.cmake)
- find_package(CVS QUIET)
- else()
- find_program(CVS_EXECUTABLE NAMES cvs)
- endif()
-
- if(CVS_EXECUTABLE)
- set(do_cvs_tests 1)
- endif()
-
- if(do_cvs_tests AND NOT UNIX)
- if("${CVS_EXECUTABLE}" MATCHES "cygwin")
- set(do_cvs_tests 0)
- endif()
- endif()
-
# Should CPack tests be run? By default, yes, but...
#
# Disable packaging test on Apple 10.3 and below. PackageMaker starts
@@ -1574,6 +1554,12 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(FindMatlab.targets_checks ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>)
endif()
+ set(ExternalProject_BUILD_OPTIONS "")
+ foreach(vcs CVS SVN GIT HG)
+ if(DEFINED CMake_TEST_ExternalProject_${vcs})
+ list(APPEND ExternalProject_BUILD_OPTIONS -DEP_TEST_${vcs}=${CMake_TEST_ExternalProject_${vcs}})
+ endif()
+ endforeach()
add_test(ExternalProject ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/ExternalProject"
@@ -1582,6 +1568,7 @@ if(BUILD_TESTING)
--build-project ExternalProjectTest
--build-exe-dir "${CMake_BINARY_DIR}/Tests/ExternalProject"
--force-new-ctest-process
+ --build-options ${ExternalProject_BUILD_OPTIONS}
--test-command ${CMAKE_CTEST_COMMAND} -V
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ExternalProject")
@@ -2562,9 +2549,8 @@ if(BUILD_TESTING)
# -S "${CMake_BINARY_DIR}/Tests/CTestScriptMode/CTestTestScriptMode.cmake"
# )
- set(CTEST_TEST_UPDATE 1)
- if(CTEST_TEST_UPDATE)
- # Test CTest Update with Subversion
+ # Test CTest Update with Subversion
+ if(NOT DEFINED CMake_TEST_CTestUpdate_SVN OR CMake_TEST_CTestUpdate_SVN)
find_package(Subversion QUIET)
if(Subversion_FOUND)
get_filename_component(_Subversion_BIN_DIR
@@ -2577,129 +2563,134 @@ if(BUILD_TESTING)
set(Subversion_FOUND FALSE)
endif()
endif()
- if(Subversion_FOUND)
- set(CTestUpdateSVN_DIR "CTest UpdateSVN")
- configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateSVN.cmake.in"
- "${CMake_BINARY_DIR}/Tests/CTestUpdateSVN.cmake" @ONLY)
- add_test(CTest.UpdateSVN ${CMAKE_CMAKE_COMMAND}
- -P "${CMake_BINARY_DIR}/Tests/CTestUpdateSVN.cmake"
- )
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateSVN_DIR}")
+ endif()
+ if(NOT DEFINED CMake_TEST_CTestUpdate_SVN AND Subversion_FOUND)
+ set(CMake_TEST_CTestUpdate_SVN 1)
+ endif()
+ if(CMake_TEST_CTestUpdate_SVN)
+ if(NOT Subversion_FOUND)
+ message(FATAL_ERROR "CMake_TEST_CTestUpdate_SVN enabled but Subversion is not found.")
endif()
+ set(CTestUpdateSVN_DIR "CTest UpdateSVN")
+ configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateSVN.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestUpdateSVN.cmake" @ONLY)
+ add_test(CTest.UpdateSVN ${CMAKE_CMAKE_COMMAND}
+ -P "${CMake_BINARY_DIR}/Tests/CTestUpdateSVN.cmake"
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateSVN_DIR}")
+ endif()
- # Test CTest Update with CVS
- if(EXISTS ${CMAKE_ROOT}/Modules/FindCVS.cmake)
- find_package(CVS QUIET)
- else()
- find_program(CVS_EXECUTABLE NAMES cvs)
- set(CVS_FOUND ${CVS_EXECUTABLE})
- endif()
- set(CTEST_TEST_UPDATE_CVS ${CVS_FOUND})
- if(CTEST_TEST_UPDATE_CVS AND NOT UNIX)
- if("${CVS_EXECUTABLE}" MATCHES "cygwin")
- message(STATUS "No CTest.UpdateCVS test with cygwin cvs.exe outside cygwin!")
- set(CTEST_TEST_UPDATE_CVS 0)
- endif()
- endif()
- if(CTEST_TEST_UPDATE_CVS)
- set(CTestUpdateCVS_DIR "CTest UpdateCVS")
- configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateCVS.cmake.in"
- "${CMake_BINARY_DIR}/Tests/CTestUpdateCVS.cmake" @ONLY)
- add_test(CTest.UpdateCVS ${CMAKE_CMAKE_COMMAND}
- -P "${CMake_BINARY_DIR}/Tests/CTestUpdateCVS.cmake"
- )
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateCVS_DIR}")
+ # Test CTest Update with CVS
+ if(NOT DEFINED CMake_TEST_CTestUpdate_CVS OR CMake_TEST_CTestUpdate_CVS)
+ find_program(CVS_EXECUTABLE NAMES cvs)
+ mark_as_advanced(CVS_EXECUTABLE)
+ endif()
+ if(NOT DEFINED CMake_TEST_CTestUpdate_CVS AND CVS_EXECUTABLE
+ AND (UNIX OR NOT "${CVS_EXECUTABLE}" MATCHES "cygwin"))
+ set(CMake_TEST_CTestUpdate_CVS 1)
+ endif()
+ if(CMake_TEST_CTestUpdate_CVS)
+ if(NOT CVS_EXECUTABLE)
+ message(FATAL_ERROR "CMake_TEST_CTestUpdate_CVS enabled but CVS_EXECUTABLE is not found.")
endif()
+ set(CTestUpdateCVS_DIR "CTest UpdateCVS")
+ configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateCVS.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestUpdateCVS.cmake" @ONLY)
+ add_test(CTest.UpdateCVS ${CMAKE_CMAKE_COMMAND}
+ -P "${CMake_BINARY_DIR}/Tests/CTestUpdateCVS.cmake"
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateCVS_DIR}")
+ endif()
- # Test CTest Update with BZR
+ # Test CTest Update with BZR
+ if(CMake_TEST_CTestUpdate_BZR)
find_program(BZR_EXECUTABLE NAMES bzr)
mark_as_advanced(BZR_EXECUTABLE)
- set(CTEST_TEST_UPDATE_BZR 0)
- if(BZR_EXECUTABLE)
- if(NOT "${BZR_EXECUTABLE}" MATCHES "cygwin" OR UNIX)
- set(CTEST_TEST_UPDATE_BZR 1)
- endif()
- endif()
- if(CTEST_TEST_UPDATE_BZR)
- # Check if xmloutput plugin is there
- execute_process(COMMAND ${BZR_EXECUTABLE} xmlplugins RESULT_VARIABLE xmlplugres
- OUTPUT_QUIET ERROR_QUIET)
- if( NOT ${xmlplugres} )
- set(CTestUpdateBZR_DIR "CTest UpdateBZR")
- configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateBZR.cmake.in"
- "${CMake_BINARY_DIR}/Tests/CTestUpdateBZR.cmake" @ONLY)
- add_test(CTest.UpdateBZR ${CMAKE_CMAKE_COMMAND}
- -P "${CMake_BINARY_DIR}/Tests/CTestUpdateBZR.cmake"
- )
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateBZR_DIR}")
- set(CTestUpdateBZR_DIR "CTest UpdateBZR_CLocale")
- configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateBZR.cmake.in"
- "${CMake_BINARY_DIR}/Tests/CTestUpdateBZR_CLocale.cmake" @ONLY)
- add_test(CTest.UpdateBZR.CLocale ${CMAKE_CMAKE_COMMAND}
- -P "${CMake_BINARY_DIR}/Tests/CTestUpdateBZR_CLocale.cmake"
- )
- set_tests_properties(CTest.UpdateBZR.CLocale PROPERTIES ENVIRONMENT LC_ALL=C)
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateBZR_DIR}")
- endif()
- endif()
+ if(NOT BZR_EXECUTABLE)
+ message(FATAL_ERROR "CMake_TEST_CTestUpdate_BZR enabled but BZR_EXECUTABLE is not found.")
+ endif()
+ set(CTestUpdateBZR_DIR "CTest UpdateBZR")
+ configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateBZR.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestUpdateBZR.cmake" @ONLY)
+ add_test(CTest.UpdateBZR ${CMAKE_CMAKE_COMMAND}
+ -P "${CMake_BINARY_DIR}/Tests/CTestUpdateBZR.cmake"
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateBZR_DIR}")
+ set(CTestUpdateBZR_DIR "CTest UpdateBZR_CLocale")
+ configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateBZR.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestUpdateBZR_CLocale.cmake" @ONLY)
+ add_test(CTest.UpdateBZR.CLocale ${CMAKE_CMAKE_COMMAND}
+ -P "${CMake_BINARY_DIR}/Tests/CTestUpdateBZR_CLocale.cmake"
+ )
+ set_tests_properties(CTest.UpdateBZR.CLocale PROPERTIES ENVIRONMENT LC_ALL=C)
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateBZR_DIR}")
+ endif()
- # Test CTest Update with GIT
+ # Test CTest Update with GIT
+ if(NOT DEFINED CMake_TEST_CTestUpdate_GIT OR CMake_TEST_CTestUpdate_GIT)
find_program(GIT_EXECUTABLE NAMES git)
mark_as_advanced(GIT_EXECUTABLE)
- set(CTEST_TEST_UPDATE_GIT 0)
- if(GIT_EXECUTABLE)
- if(NOT "${GIT_EXECUTABLE}" MATCHES "cygwin" OR UNIX)
- set(CTEST_TEST_UPDATE_GIT 1)
- endif()
- endif()
- if(CTEST_TEST_UPDATE_GIT)
- set(CTestUpdateGIT_DIR "CTest UpdateGIT")
- configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateGIT.cmake.in"
- "${CMake_BINARY_DIR}/Tests/CTestUpdateGIT.cmake" @ONLY)
- add_test(CTest.UpdateGIT ${CMAKE_CMAKE_COMMAND}
- -P "${CMake_BINARY_DIR}/Tests/CTestUpdateGIT.cmake"
- )
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateGIT_DIR}")
+ endif()
+ if(NOT DEFINED CMake_TEST_CTestUpdate_GIT AND GIT_EXECUTABLE
+ AND (UNIX OR NOT "${GIT_EXECUTABLE}" MATCHES "cygwin"))
+ set(CMake_TEST_CTestUpdate_GIT 1)
+ endif()
+ if(CMake_TEST_CTestUpdate_GIT)
+ if(NOT GIT_EXECUTABLE)
+ message(FATAL_ERROR "CMake_TEST_CTestUpdate_GIT enabled but GIT_EXECUTABLE is not found.")
endif()
+ set(CTestUpdateGIT_DIR "CTest UpdateGIT")
+ configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateGIT.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestUpdateGIT.cmake" @ONLY)
+ add_test(CTest.UpdateGIT ${CMAKE_CMAKE_COMMAND}
+ -P "${CMake_BINARY_DIR}/Tests/CTestUpdateGIT.cmake"
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateGIT_DIR}")
+ endif()
- # Test CTest Update with HG
+ # Test CTest Update with HG
+ if(NOT DEFINED CMake_TEST_CTestUpdate_HG OR CMake_TEST_CTestUpdate_HG)
find_program(HG_EXECUTABLE NAMES hg)
mark_as_advanced(HG_EXECUTABLE)
- set(CTEST_TEST_UPDATE_HG 0)
- if(HG_EXECUTABLE)
- if(NOT "${HG_EXECUTABLE}" MATCHES "cygwin" OR UNIX)
- set(CTEST_TEST_UPDATE_HG 1)
- endif()
- endif()
- if(CTEST_TEST_UPDATE_HG)
- set(CTestUpdateHG_DIR "CTest UpdateHG")
- configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateHG.cmake.in"
- "${CMake_BINARY_DIR}/Tests/CTestUpdateHG.cmake" @ONLY)
- add_test(CTest.UpdateHG ${CMAKE_CMAKE_COMMAND}
- -P "${CMake_BINARY_DIR}/Tests/CTestUpdateHG.cmake"
- )
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateHG_DIR}")
+ endif()
+ if(NOT DEFINED CMake_TEST_CTestUpdate_HG AND HG_EXECUTABLE
+ AND (UNIX OR NOT "${HG_EXECUTABLE}" MATCHES "cygwin"))
+ set(CMake_TEST_CTestUpdate_HG 1)
+ endif()
+ if(CMake_TEST_CTestUpdate_HG)
+ if(NOT HG_EXECUTABLE)
+ message(FATAL_ERROR "CMake_TEST_CTestUpdate_HG enabled but HG_EXECUTABLE is not found.")
endif()
+ set(CTestUpdateHG_DIR "CTest UpdateHG")
+ configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateHG.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestUpdateHG.cmake" @ONLY)
+ add_test(CTest.UpdateHG ${CMAKE_CMAKE_COMMAND}
+ -P "${CMake_BINARY_DIR}/Tests/CTestUpdateHG.cmake"
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateHG_DIR}")
+ endif()
- # Test CTest Update with P4
+ # Test CTest Update with P4
+ if(NOT DEFINED CMake_TEST_CTestUpdate_P4 OR CMake_TEST_CTestUpdate_P4)
find_program(P4_EXECUTABLE NAMES p4)
find_program(P4D_EXECUTABLE NAMES p4d)
mark_as_advanced(P4_EXECUTABLE P4D_EXECUTABLE)
- set(CTEST_TEST_UPDATE_P4 0)
- if(P4_EXECUTABLE AND P4D_EXECUTABLE)
- if(NOT "${P4_EXECUTABLE};${P4D_EXECUTABLE}" MATCHES "cygwin" OR UNIX)
- set(CTEST_TEST_UPDATE_P4 1)
- endif()
- endif()
- if(CTEST_TEST_UPDATE_P4)
- set(CTestUpdateP4_DIR "CTest UpdateP4")
- configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateP4.cmake.in"
- "${CMake_BINARY_DIR}/Tests/CTestUpdateP4.cmake" @ONLY)
- add_test(CTest.UpdateP4 ${CMAKE_CMAKE_COMMAND}
- -P "${CMake_BINARY_DIR}/Tests/CTestUpdateP4.cmake"
- )
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateP4_DIR}")
+ endif()
+ if(NOT DEFINED CMake_TEST_CTestUpdate_P4 AND P4_EXECUTABLE AND P4D_EXECUTABLE
+ AND (UNIX OR NOT "${P4_EXECUTABLE};${P4D_EXECUTABLE}" MATCHES "cygwin"))
+ set(CMake_TEST_CTestUpdate_P4 1)
+ endif()
+ if(CMake_TEST_CTestUpdate_P4)
+ if(NOT P4_EXECUTABLE OR NOT P4D_EXECUTABLE)
+ message(FATAL_ERROR "CMake_TEST_CTestUpdate_HG enabled but P4_EXECUTABLE and P4D_EXECUTABLE are not both not found.")
endif()
+ set(CTestUpdateP4_DIR "CTest UpdateP4")
+ configure_file("${CMake_SOURCE_DIR}/Tests/CTestUpdateP4.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestUpdateP4.cmake" @ONLY)
+ add_test(CTest.UpdateP4 ${CMAKE_CMAKE_COMMAND}
+ -P "${CMake_BINARY_DIR}/Tests/CTestUpdateP4.cmake"
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateP4_DIR}")
endif()
configure_file(
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index 8a85045..e4c6c66 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -8,10 +8,50 @@ include(ExternalProject)
# Test ExternalProject, especially with checkouts from VCS
-find_package(CVS)
-find_package(Subversion)
-find_package(Git)
-find_package(Hg)
+if(NOT DEFINED EP_TEST_CVS OR EP_TEST_CVS)
+ find_package(CVS)
+endif()
+if(NOT DEFINED EP_TEST_CVS AND CVS_FOUND AND (UNIX OR NOT "${CVS_EXECUTABLE}" MATCHES "cygwin"))
+ set(EP_TEST_CVS 1)
+endif()
+
+if(NOT DEFINED EP_TEST_SVN OR EP_TEST_SVN)
+ find_package(Subversion)
+ if(Subversion_FOUND AND Subversion_VERSION_SVN VERSION_LESS 1.2)
+ message(STATUS "No ExternalProject svn tests with svn client less than version 1.2")
+ set(Subversion_FOUND 0)
+ endif()
+ # Only do svn tests in cygwin/cygwin or not-cygwin/not-cygwin arrangements:
+ if(Subversion_FOUND AND CMAKE_CURRENT_BINARY_DIR MATCHES "cygdrive/" AND NOT "${Subversion_SVN_EXECUTABLE}" MATCHES "cygwin")
+ message(STATUS "No ExternalProject svn tests with non-cygwin svn client in a /cygdrive based build")
+ set(Subversion_FOUND 0)
+ endif()
+endif()
+if(NOT DEFINED EP_TEST_SVN AND Subversion_FOUND)
+ set(EP_TEST_SVN 1)
+endif()
+
+if(NOT DEFINED EP_TEST_GIT OR EP_TEST_GIT)
+ find_package(Git)
+endif()
+if(NOT DEFINED EP_TEST_GIT AND Git_FOUND)
+ message(STATUS "GIT_VERSION_STRING='${GIT_VERSION_STRING}'")
+ if(NOT "${GIT_VERSION_STRING}" VERSION_LESS 1.6.5)
+ set(EP_TEST_GIT 1)
+ endif()
+endif()
+
+if(NOT DEFINED EP_TEST_HG OR EP_TEST_HG)
+ find_package(Hg)
+endif()
+if(NOT DEFINED EP_TEST_HG AND Hg_FOUND)
+ set(EP_TEST_HG 1)
+endif()
+
+message(STATUS "EP_TEST_CVS='${EP_TEST_CVS}' CVS_EXECUTABLE='${CVS_EXECUTABLE}'")
+message(STATUS "EP_TEST_SVN='${EP_TEST_SVN}' Subversion_SVN_EXECUTABLE='${Subversion_SVN_EXECUTABLE}'")
+message(STATUS "EP_TEST_GIT='${EP_TEST_GIT}' GIT_EXECUTABLE='${GIT_EXECUTABLE}'")
+message(STATUS "EP_TEST_HG='${EP_TEST_HG}' HG_EXECUTABLE='${HG_EXECUTABLE}'")
option(ExternalProjectTest_USE_FOLDERS "Enable folder grouping in IDEs." ON)
if(ExternalProjectTest_USE_FOLDERS)
@@ -115,20 +155,7 @@ ExternalProject_Add(${proj}
# CVS-based tests:
#
-set(do_cvs_tests 0)
-
-if(CVS_EXECUTABLE)
- set(do_cvs_tests 1)
-endif()
-
-if(do_cvs_tests AND NOT UNIX)
- if("${CVS_EXECUTABLE}" MATCHES "cygwin")
- message(STATUS "No ExternalProject cvs tests with cygwin cvs.exe outside cygwin!")
- set(do_cvs_tests 0)
- endif()
-endif()
-
-if(do_cvs_tests)
+if(EP_TEST_CVS)
# Unzip/untar the CVS repository in our source folder so that other
# projects below may use it to test CVS args of ExternalProject_Add
#
@@ -207,32 +234,7 @@ endif()
# SVN-based tests:
#
-set(do_svn_tests 0)
-
-if(Subversion_SVN_EXECUTABLE)
- set(do_svn_tests 1)
-endif()
-
-# Only do svn tests with svn >= version 1.2
-#
-if(do_svn_tests)
- if(Subversion_VERSION_SVN VERSION_LESS 1.2)
- message(STATUS "No ExternalProject svn tests with svn client less than version 1.2")
- set(do_svn_tests 0)
- endif()
-endif()
-
-# Only do svn tests in cygwin/cygwin or not-cygwin/not-cygwin arrangements:
-#
-if(do_svn_tests)
- if(CMAKE_CURRENT_BINARY_DIR MATCHES "cygdrive/" AND
- NOT "${Subversion_SVN_EXECUTABLE}" MATCHES "cygwin")
- message(STATUS "No ExternalProject svn tests with non-cygwin svn client in a /cygdrive based build")
- set(do_svn_tests 0)
- endif()
-endif()
-
-if(do_svn_tests)
+if(EP_TEST_SVN)
# Unzip/untar the SVN repository in our source folder so that other
# projects below may use it to test SVN args of ExternalProject_Add
#
@@ -292,22 +294,7 @@ if(do_svn_tests)
set_property(TARGET ${proj} PROPERTY FOLDER "SVN")
endif()
-
-set(do_git_tests 0)
-
-if(GIT_EXECUTABLE)
- set(do_git_tests 1)
-
- message(STATUS "GIT_VERSION_STRING='${GIT_VERSION_STRING}'")
-
- if("${GIT_VERSION_STRING}" VERSION_LESS 1.6.5)
- message(STATUS "No ExternalProject git tests with git client less than version 1.6.5")
- set(do_git_tests 0)
- endif()
-endif()
-
-
-if(do_git_tests)
+if(EP_TEST_GIT)
set(local_git_repo "../../LocalRepositories/GIT")
# Unzip/untar the git repository in our source folder so that other
@@ -554,20 +541,7 @@ if(do_git_tests)
endif()
-set(do_hg_tests 0)
-
-if(HG_EXECUTABLE)
- set(do_hg_tests 1)
-endif()
-
-if(do_hg_tests AND NOT UNIX)
- if("${HG_EXECUTABLE}" MATCHES "cygwin")
- message(STATUS "No ExternalProject hg tests with cygwin hg outside cygwin!")
- set(do_hg_tests 0)
- endif()
-endif()
-
-if(do_hg_tests)
+if(EP_TEST_HG)
set(local_hg_repo "../../LocalRepositories/HG")
# Unzip/untar the hg repository in our source folder so that other
@@ -642,7 +616,7 @@ enable_testing()
#
# BuildTree tests:
#
-if(do_cvs_tests)
+if(EP_TEST_CVS)
add_test(TutorialStep1-CVS-20090626-BuildTreeTest
"${binary_base}/TutorialStep1-CVS-20090626/Tutorial" 4)
@@ -653,7 +627,7 @@ if(do_cvs_tests)
"${binary_base}/TutorialStep1-CVS-HEAD/Tutorial" 81)
endif()
-if(do_svn_tests)
+if(EP_TEST_SVN)
add_test(TutorialStep1-SVN-20090626-BuildTreeTest
"${binary_base}/TutorialStep1-SVN-20090626/Tutorial" 100)
@@ -664,7 +638,7 @@ if(do_svn_tests)
"${binary_base}/TutorialStep1-SVN-trunk/Tutorial" 98)
endif()
-if(do_git_tests)
+if(EP_TEST_GIT)
add_test(TutorialStep1-GIT-byhash
${CMAKE_COMMAND} -P "${binary_base}/TutorialStep1-GIT-byhash/example.cmake")
@@ -686,13 +660,6 @@ if(do_git_tests)
endif()
endif()
-
-message(STATUS "do_cvs_tests='${do_cvs_tests}'")
-message(STATUS "do_svn_tests='${do_svn_tests}'")
-message(STATUS "do_git_tests='${do_git_tests}' GIT_EXECUTABLE='${GIT_EXECUTABLE}'")
-message(STATUS "do_hg_tests='${do_hg_tests}' HG_EXECUTABLE='${HG_EXECUTABLE}'")
-
-
# Test if log works when the first arguments of *_COMMAND is "COMMAND".
set(proj ExternalProject-no-log)
set(download_cmd "")