CMakeLists.txt 1.1 KB

1234567891011121314151617181920212223242526272829
  1. set(input ../Data.txt)
  2. set(output ${CMAKE_BINARY_DIR}/Data.txt)
  3. ExternalData_Expand_Arguments(Data args DATA{${input}})
  4. if("x${args}" STREQUAL "x${output}")
  5. message(STATUS "Data reference correctly transformed in parent dir 1!")
  6. else()
  7. message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
  8. "but we expected:\n ${output}")
  9. endif()
  10. set(input ${CMAKE_CURRENT_SOURCE_DIR}/../Data.txt)
  11. set(output ${CMAKE_BINARY_DIR}/Data.txt)
  12. ExternalData_Expand_Arguments(Data args DATA{${input}})
  13. if("x${args}" STREQUAL "x${output}")
  14. message(STATUS "Data reference correctly transformed in parent dir 2!")
  15. else()
  16. message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
  17. "but we expected:\n ${output}")
  18. endif()
  19. set(input Data.txt)
  20. set(output ${CMAKE_CURRENT_BINARY_DIR}/Data.txt)
  21. ExternalData_Expand_Arguments(Data args DATA{${input}})
  22. if("x${args}" STREQUAL "x${output}")
  23. message(STATUS "Data reference correctly transformed in current dir!")
  24. else()
  25. message(FATAL_ERROR "Data reference transformed to:\n ${args}\n"
  26. "but we expected:\n ${output}")
  27. endif()