summaryrefslogtreecommitdiff
path: root/Modules/CTest.cmake
diff options
context:
space:
mode:
authorPedro Navarro <pnavarro@netflix.com>2013-10-22 15:11:22 -0700
committerBrad King <brad.king@kitware.com>2013-10-26 10:24:15 -0400
commit970c82348babacb918802dbf615b2224313eef55 (patch)
treeca1f6f1466038ecfcfeb56ce8cca0f3231315e93 /Modules/CTest.cmake
parentddef8a7cfffbbae12f2d2c556651f06346237569 (diff)
downloadcmake-970c82348babacb918802dbf615b2224313eef55.tar.gz
ctest_update: Add support for Perforce p4 client
Teach the ctest_update implementation to use the p4 command-line client to perform updates and extract the list of changes. Add a CTest.UpdateP4 test like those that exist already for the other version control tools. Make the test available when p4 and the p4d server are found. During the test launch p4d in the background to serve a repository from the test directory. Then direct the client toward this server for the duration of the test.
Diffstat (limited to 'Modules/CTest.cmake')
-rw-r--r--Modules/CTest.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index 643cd293db..ada8655fb3 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -149,6 +149,7 @@ if(BUILD_TESTING)
find_program(BZRCOMMAND bzr)
find_program(HGCOMMAND hg)
find_program(GITCOMMAND git)
+ find_program(P4COMMAND p4)
if(NOT UPDATE_TYPE)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS")
@@ -180,6 +181,9 @@ if(BUILD_TESTING)
elseif("${_update_type}" STREQUAL "git")
set(UPDATE_COMMAND "${GITCOMMAND}")
set(UPDATE_OPTIONS "${GIT_UPDATE_OPTIONS}")
+ elseif("${_update_type}" STREQUAL "p4")
+ set(UPDATE_COMMAND "${P4COMMAND}")
+ set(UPDATE_OPTIONS "${P4_UPDATE_OPTIONS}")
endif()
set(DART_TESTING_TIMEOUT 1500 CACHE STRING
@@ -275,6 +279,7 @@ if(BUILD_TESTING)
CVS_UPDATE_OPTIONS
DART_TESTING_TIMEOUT
GITCOMMAND
+ P4COMMAND
HGCOMMAND
MAKECOMMAND
MEMORYCHECK_COMMAND