mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-20 05:12:07 -05:00
ExternalData: Add support for custom download scripts
Add support for a special URL template to map the fetch operation to a project-specified .cmake script insead of using file(DOWNLOAD). Extend the Module.ExternalData test to cover the behavior. Extend the RunCMake.ExternalData test to cover error cases.
This commit is contained in:
5
Tests/Module/ExternalData/MyScript1.cmake
Normal file
5
Tests/Module/ExternalData/MyScript1.cmake
Normal file
@@ -0,0 +1,5 @@
|
||||
if(ExternalData_CUSTOM_LOCATION STREQUAL "MD5/fd95c03719e8626c0d10a818f9996dc5")
|
||||
file(WRITE "${ExternalData_CUSTOM_FILE}" "DataScript")
|
||||
else()
|
||||
set(ExternalData_CUSTOM_ERROR "no ${ExternalData_CUSTOM_LOCATION} known")
|
||||
endif()
|
||||
Reference in New Issue
Block a user