Files
CMake/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake
Josef Angstenberger 462b6d83e8 file(GENERATE): Test source properties
Output files get the source property `GENERATED` which is indirectly
checked by adding them to a library.
For a missing file that is not generated CMake will abort.

With the new behavior according CMP0070 relative files are generated
into the binary directory.
2020-08-19 09:05:53 -04:00

9 lines
205 B
CMake

enable_language(C)
add_library(foo)
cmake_policy(SET CMP0070 OLD)
file(GENERATE OUTPUT relative-output-OLD.c CONTENT "")
target_sources(foo PRIVATE
"${CMAKE_CURRENT_BINARY_DIR}/relative-output-OLD.c"
)