diff options
author | Raul Tambre <raul@tambre.ee> | 2020-08-15 18:53:15 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2020-08-20 14:41:52 (GMT) |
commit | 27a912193bfe77e400784b152b1cd67003915c37 (patch) | |
tree | 5919a51c400894c9891720f44b842d347a892b31 /Tests/RunCMake/File_Generate/sub2 | |
parent | 2a8f363a54c77bf1f110deabf1933e71a93ef3f4 (diff) | |
download | CMake-27a912193bfe77e400784b152b1cd67003915c37.zip CMake-27a912193bfe77e400784b152b1cd67003915c37.tar.gz CMake-27a912193bfe77e400784b152b1cd67003915c37.tar.bz2 |
file(GENERATE): Add TARGET argument
Adds TARGET argument to file(GENERATE) to make resolving generator expressions
requiring a target possible.
Implements #21101, fixes #21074.
Diffstat (limited to 'Tests/RunCMake/File_Generate/sub2')
-rw-r--r-- | Tests/RunCMake/File_Generate/sub2/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/File_Generate/sub2/CMakeLists.txt b/Tests/RunCMake/File_Generate/sub2/CMakeLists.txt new file mode 100644 index 0000000..09b81ac --- /dev/null +++ b/Tests/RunCMake/File_Generate/sub2/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library(library IMPORTED STATIC) +set_property(TARGET library PROPERTY COMPILE_DEFINITIONS "second") + +file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/output.txt" + CONTENT "$<TARGET_PROPERTY:COMPILE_DEFINITIONS>" + TARGET library +) |