Merge topic 'file_generate_target'

27a912193b file(GENERATE): Add TARGET argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5131
This commit is contained in:
Brad King
2020-08-25 14:30:54 +00:00
committed by Kitware Robot
11 changed files with 79 additions and 24 deletions
+5 -1
View File
@@ -449,7 +449,7 @@ modified.
file(GENERATE OUTPUT output-file
<INPUT input-file|CONTENT content>
[CONDITION expression])
[CONDITION expression] [TARGET target])
Generate an output file for each build configuration supported by the current
:manual:`CMake Generator <cmake-generators(7)>`. Evaluate
@@ -479,6 +479,10 @@ from the input content to produce the output content. The options are:
with respect to the value of :variable:`CMAKE_CURRENT_BINARY_DIR`.
See policy :policy:`CMP0070`.
``TARGET <target>``
Specify target which to use when evaluating generator expressions. Enables
use of generator expressions requiring a target.
Exactly one ``CONTENT`` or ``INPUT`` option must be given. A specific
``OUTPUT`` file may be named by at most one invocation of ``file(GENERATE)``.
Generated files are modified and their timestamp updated on subsequent cmake
@@ -0,0 +1,5 @@
file-generate-target
--------------------
* The :command:`file(GENERATE)` command gained a new ``TARGET`` keyword to
support resolving target-dependent generator expressions.