1 # Verify the current working directory.
2 if(NOT EXISTS CMakeLists.txt)
3 message(FATAL_ERROR "File does not exist:\n ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt")
5 if(NOT EXISTS tutorial.cxx)
6 message(FATAL_ERROR "File does not exist:\n ${CMAKE_CURRENT_SOURCE_DIR}/tutorial.cxx")
9 # Check if the patch is already applied.
10 file(STRINGS CMakeLists.txt prop_line REGEX "^set_property")
12 message(STATUS "Patch already applied!")
17 file(APPEND CMakeLists.txt "
18 # Patch by ExternalProject test:
19 set_property(TARGET Tutorial PROPERTY OUTPUT_NAME EP-Tutorial)
21 message(STATUS "Patched ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt")