summaryrefslogtreecommitdiffstats
path: root/Tests/CTestUpdateHG.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CTestUpdateHG.cmake.in')
-rw-r--r--Tests/CTestUpdateHG.cmake.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/CTestUpdateHG.cmake.in b/Tests/CTestUpdateHG.cmake.in
index 5a9daae..640d2c6 100644
--- a/Tests/CTestUpdateHG.cmake.in
+++ b/Tests/CTestUpdateHG.cmake.in
@@ -28,7 +28,10 @@ run_child(
WORKING_DIRECTORY ${TOP}/repo.hg
COMMAND ${HG} init
)
-set(REPO file:///${TOP}/repo.hg)
+if(NOT "${TOP}" MATCHES "^/")
+ set(slash /)
+endif()
+set(REPO file://${slash}${TOP}/repo.hg)
#-----------------------------------------------------------------------------
# Import initial content into the repository.