mirror of
https://github.com/reactos/CMake.git
synced 2024-12-14 23:29:57 +00:00
4befecc77c
Add a Module.ExternalData test to verify data retrieval and test argument DATA{} references. Add a RunCMake.ExternalData test to verify error handling and automatic transformation of a raw data to a content link and staged object.
14 lines
481 B
CMake
14 lines
481 B
CMake
include(ExternalData)
|
|
set(ExternalData_URL_TEMPLATES
|
|
"file:///${CMAKE_CURRENT_SOURCE_DIR}/%(algo)/%(hash)"
|
|
)
|
|
set(input SubDirectory1/Data.txt)
|
|
set(output ${CMAKE_CURRENT_BINARY_DIR}/SubDirectory1/Data.txt)
|
|
ExternalData_Expand_Arguments(Data args DATA{${input}})
|
|
if("x${args}" STREQUAL "x${output}")
|
|
message(STATUS "Data reference correctly transformed!")
|
|
else()
|
|
message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
|
|
"but we expected:\n ${output}")
|
|
endif()
|