Explorar o código

Document CMP0112 covers $<TARGET_FILE_NAME,tgt>

Fixes #21559
Robert Maynard %!s(int64=5) %!d(string=hai) anos
pai
achega
cf0c71dae3
Modificáronse 2 ficheiros con 4 adicións e 0 borrados
  1. 3 0
      Help/manual/cmake-generator-expressions.7.rst
  2. 1 0
      Help/policy/CMP0112.rst

+ 3 - 0
Help/manual/cmake-generator-expressions.7.rst

@@ -648,6 +648,9 @@ which is just the string ``tgt``.
   expression is evaluated on.
   expression is evaluated on.
 ``$<TARGET_FILE_NAME:tgt>``
 ``$<TARGET_FILE_NAME:tgt>``
   The ``tgt`` filename.
   The ``tgt`` filename.
+
+  Note that ``tgt`` is not added as a dependency of the target this
+  expression is evaluated on (see policy :policy:`CMP0112`).
 ``$<TARGET_FILE_DIR:tgt>``
 ``$<TARGET_FILE_DIR:tgt>``
   Directory of the ``tgt`` binary file.
   Directory of the ``tgt`` binary file.
 
 

+ 1 - 0
Help/policy/CMP0112.rst

@@ -8,6 +8,7 @@ Target file component generator expressions do not add target dependencies.
 The following target-based generator expressions that query for directory or
 The following target-based generator expressions that query for directory or
 file name components no longer add a dependency on the evaluated target.
 file name components no longer add a dependency on the evaluated target.
 
 
+    - ``TARGET_FILE_NAME``
     - ``TARGET_FILE_DIR``
     - ``TARGET_FILE_DIR``
     - ``TARGET_LINKER_FILE_BASE_NAME``
     - ``TARGET_LINKER_FILE_BASE_NAME``
     - ``TARGET_LINKER_FILE_NAME``
     - ``TARGET_LINKER_FILE_NAME``