summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-02-03 16:04:57 (GMT)
committerBrad King <brad.king@kitware.com>2013-02-04 20:19:49 (GMT)
commitaed590a7e0c135f2466fb19cfe09674c687432ab (patch)
tree896ab95b8877e9a416ac5d797a3110a787b65255
parent06e8dedb3c1412625b146b214cb542f0577c923c (diff)
downloadCMake-aed590a7e0c135f2466fb19cfe09674c687432ab.zip
CMake-aed590a7e0c135f2466fb19cfe09674c687432ab.tar.gz
CMake-aed590a7e0c135f2466fb19cfe09674c687432ab.tar.bz2
Fix Module.ExternalData test on Cygwin
In ExternalData_URL_TEMPLATES add a leading slash to the path after file:// only if the path does not already start with one.
-rw-r--r--Tests/Module/ExternalData/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/Tests/Module/ExternalData/CMakeLists.txt b/Tests/Module/ExternalData/CMakeLists.txt
index e69713a..607e9b9 100644
--- a/Tests/Module/ExternalData/CMakeLists.txt
+++ b/Tests/Module/ExternalData/CMakeLists.txt
@@ -4,8 +4,12 @@ project(ExternalDataTest NONE)
include(CTest)
include(ExternalData)
+
+if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^/")
+ set(slash /)
+endif()
set(ExternalData_URL_TEMPLATES
- "file:///${CMAKE_CURRENT_SOURCE_DIR}/%(algo)/%(hash)"
+ "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/%(algo)/%(hash)"
)
set(ExternalData_BINARY_ROOT "${CMAKE_CURRENT_BINARY_DIR}/ExternalData")
file(REMOVE_RECURSE ${ExternalData_BINARY_ROOT}) # clean test