clear-cached-information.cmake 535 B

1234567891011121314
  1. enable_language(C)
  2. cmake_policy(SET CMP0026 OLD)
  3. add_subdirectory(clear-cached-information-dir)
  4. # Critical: this needs to happen in root CMakeLists.txt and not inside
  5. # the subdir.
  6. get_target_property(mypath Hello LOCATION)
  7. # Now we create the file later, so you can see, ultimately no error should
  8. # happen e.g. during generate phase:
  9. file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clear-cached-information-dir/main.c)
  10. set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/clear-cached-information-dir/main.c PROPERTIES GENERATED TRUE)