From aed590a7e0c135f2466fb19cfe09674c687432ab Mon Sep 17 00:00:00 2001 From: Brad King Date: Sun, 3 Feb 2013 11:04:57 -0500 Subject: 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. --- Tests/Module/ExternalData/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v0.12