summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-02 14:54:42 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-11-02 14:54:42 (GMT)
commitf61bbf1b90f940f64f4b1e7b5040c734461ba058 (patch)
tree631022f1647a6e6fe70e468a7f23b075a83c3570 /Tests
parent443d41404740568b384c77339ad624f9147c09b3 (diff)
parent1b54b1d5b7a48e8e804b32a56fc79b34ba1f0978 (diff)
downloadCMake-f61bbf1b90f940f64f4b1e7b5040c734461ba058.zip
CMake-f61bbf1b90f940f64f4b1e7b5040c734461ba058.tar.gz
CMake-f61bbf1b90f940f64f4b1e7b5040c734461ba058.tar.bz2
Merge topic 'ctest-p4'
1b54b1d ctest_update: Do not remove the p4 depot name
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CTestUpdateCommon.cmake9
-rw-r--r--Tests/CTestUpdateP4.cmake.in1
2 files changed, 10 insertions, 0 deletions
diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake
index ae8fda2..db4e08d 100644
--- a/Tests/CTestUpdateCommon.cmake
+++ b/Tests/CTestUpdateCommon.cmake
@@ -37,10 +37,19 @@ function(check_updates build)
REGEX "<(${types}|FullName)>"
LIMIT_INPUT ${max_update_xml_size}
)
+
string(REGEX REPLACE
"[ \t]*<(${types})>[ \t]*;[ \t]*<FullName>([^<]*)</FullName>"
"\\1{\\2}" UPDATE_XML_ENTRIES "${UPDATE_XML_ENTRIES}")
+ # If specified, remove the given prefix from the files in Update.xml.
+ # Some VCS systems, like Perforce, return absolute locations
+ if(DEFINED REPOSITORY_FILE_PREFIX)
+ string(REPLACE
+ "${REPOSITORY_FILE_PREFIX}" ""
+ UPDATE_XML_ENTRIES "${UPDATE_XML_ENTRIES}")
+ endif()
+
# Compare expected and actual entries
set(EXTRA "${UPDATE_XML_ENTRIES}")
list(REMOVE_ITEM EXTRA ${ARGN} ${UPDATE_EXTRA} ${UPDATE_MAYBE})
diff --git a/Tests/CTestUpdateP4.cmake.in b/Tests/CTestUpdateP4.cmake.in
index f23bd11..f0420c4 100644
--- a/Tests/CTestUpdateP4.cmake.in
+++ b/Tests/CTestUpdateP4.cmake.in
@@ -8,6 +8,7 @@ set(P4_TOP "${TOP}")
set(TOP "${TOP}/@CTestUpdateP4_DIR@")
# Include code common to all update tests.
+set(REPOSITORY_FILE_PREFIX "//ctest/")
include("@CMAKE_CURRENT_SOURCE_DIR@/CTestUpdateCommon.cmake")
#-----------------------------------------------------------------------------