CMP0189.rst 1.3 KB

123456789101112131415161718192021222324252627282930
  1. CMP0189
  2. -------
  3. .. versionadded:: 4.1
  4. :genex:`TARGET_PROPERTY` evaluates ``LINK_LIBRARIES`` properties transitively.
  5. The :prop_tgt:`LINK_LIBRARIES` and :prop_tgt:`INTERFACE_LINK_LIBRARIES`
  6. target properties record link dependencies through which the
  7. :genex:`TARGET_PROPERTY` generator expression evaluates transitive properties.
  8. However, in CMake 4.0 and below, the properties themselves were not evaluated
  9. transitively. CMake 4.1 and above prefer to evaluate the
  10. :prop_tgt:`LINK_LIBRARIES` and :prop_tgt:`INTERFACE_LINK_LIBRARIES`
  11. target properties transitively because they are among the
  12. :ref:`build specification <Target Build Specification>` and
  13. :ref:`usage requirement <Target Usage Requirements>` properties, respectively.
  14. This policy provides compatibility for projects that have not been updated to
  15. expect the new behavior.
  16. The ``OLD`` behavior of this policy is for :genex:`TARGET_PROPERTY` to not
  17. evaluate :prop_tgt:`LINK_LIBRARIES` and :prop_tgt:`INTERFACE_LINK_LIBRARIES`
  18. transitively. The ``NEW`` behavior is for :genex:`TARGET_PROPERTY` to
  19. evaluate :prop_tgt:`LINK_LIBRARIES` and :prop_tgt:`INTERFACE_LINK_LIBRARIES`
  20. transitively.
  21. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 4.1
  22. .. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn
  23. .. include:: include/STANDARD_ADVICE.rst
  24. .. include:: include/DEPRECATED.rst