mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-02 04:02:23 +03:00
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.
This commit is contained in:
1 parent
06e8dedb3c
commit
aed590a7e0
1 file changed
+5
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user