diff options
Diffstat (limited to 'Tests/RunCMake/CMP0026/clear-cached-information.cmake')
-rw-r--r-- | Tests/RunCMake/CMP0026/clear-cached-information.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0026/clear-cached-information.cmake b/Tests/RunCMake/CMP0026/clear-cached-information.cmake new file mode 100644 index 0000000..dd2dd72 --- /dev/null +++ b/Tests/RunCMake/CMP0026/clear-cached-information.cmake @@ -0,0 +1,14 @@ + +enable_language(C) + +cmake_policy(SET CMP0026 OLD) + +add_subdirectory(clear-cached-information-dir) + +# Critical: this needs to happen in root CMakeLists.txt and not inside +# the subdir. +get_target_property(mypath Hello LOCATION) +# Now we create the file later, so you can see, ultimately no error should +# happen e.g. during generate phase: +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clear-cached-information-dir/main.c) +set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/clear-cached-information-dir/main.c PROPERTIES GENERATED TRUE) |