| 1 |
include(ExternalData) |
| 2 |
set(ExternalData_URL_TEMPLATES |
| 3 |
"file:///${CMAKE_CURRENT_SOURCE_DIR}/%(algo)/%(hash)" |
| 4 |
) |
| 5 |
set(input Data.txt) |
| 6 |
set(output ${CMAKE_CURRENT_BINARY_DIR}/Data.txt) |
| 7 |
ExternalData_Expand_Arguments(Data args DATA{${input}} "a\\;b" "c;d" DATA{${input}}) |
| 8 |
set(expect "${output};a\\;b;c;d;${output}") |
| 9 |
if("x${args}" STREQUAL "x${expect}") |
| 10 |
message(STATUS "Data arguments correctly transformed!") |
| 11 |
else() |
| 12 |
message(FATAL_ERROR "Data arguments transformed to:\n ${args}\n" |
| 13 |
"but we expected:\n ${expect}") |
| 14 |
endif() |