diff options
author | Brad King <brad.king@kitware.com> | 2013-10-26 14:29:28 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-10-26 14:29:28 (GMT) |
commit | ef13fc4dfcbb2b7cf79aade2d7612c3748fb24b2 (patch) | |
tree | f470665dd5c656ce14063971d3ad4f1d1a87132e /Tests/CMakeLists.txt | |
parent | 40df0d653659fe3403bbeb5e3251f8cea72926fd (diff) | |
parent | 970c82348babacb918802dbf615b2224313eef55 (diff) | |
download | CMake-ef13fc4dfcbb2b7cf79aade2d7612c3748fb24b2.zip CMake-ef13fc4dfcbb2b7cf79aade2d7612c3748fb24b2.tar.gz CMake-ef13fc4dfcbb2b7cf79aade2d7612c3748fb24b2.tar.bz2 |
Merge topic 'ctest-p4'
970c823 ctest_update: Add support for Perforce p4 client
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index b9c99e3..825504b 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1877,6 +1877,26 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateHG_DIR}") endif() + + # Test CTest Update with 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() endif() configure_file( |