| 1 |
include(ExternalData) |
| 2 |
set(ExternalData_LINK_CONTENT MD5) |
| 3 |
set(ExternalData_SOURCE_ROOT ${CMAKE_CURRENT_BINARY_DIR}) |
| 4 |
set(ExternalData_BINARY_ROOT ${CMAKE_CURRENT_BINARY_DIR}) |
| 5 |
set(input ${CMAKE_CURRENT_BINARY_DIR}/ToLink.txt) |
| 6 |
file(REMOVE ${input}.md5) |
| 7 |
file(WRITE ${input} "To be transformed into a content link.") |
| 8 |
ExternalData_Expand_Arguments(Data args DATA{${input}}) |
| 9 |
if("x${args}" STREQUAL "x${input}") |
| 10 |
message(STATUS "Data reference correctly not transformed!") |
| 11 |
else() |
| 12 |
message(FATAL_ERROR "Data reference transformed to:\n ${args}\n" |
| 13 |
"but we expected no transformation.") |
| 14 |
endif() |