1
0

CMP0051.rst 1.0 KB

12345678910111213141516171819202122232425262728
  1. CMP0051
  2. -------
  3. .. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
  4. .. include:: include/REMOVED_PROLOGUE.rst
  5. .. versionadded:: 3.1
  6. List :genex:`TARGET_OBJECTS` in SOURCES target property.
  7. CMake 3.0 and lower did not include the ``TARGET_OBJECTS``
  8. :manual:`generator expression <cmake-generator-expressions(7)>` when
  9. returning the :prop_tgt:`SOURCES` target property.
  10. Configure-time CMake code is not able to handle generator expressions. If
  11. using the :prop_tgt:`SOURCES` target property at configure time, it may be
  12. necessary to first remove generator expressions using the
  13. :command:`string(GENEX_STRIP)` command. Generate-time CMake code such as
  14. :command:`file(GENERATE)` can handle the content without stripping.
  15. The ``OLD`` behavior for this policy is to omit ``TARGET_OBJECTS``
  16. expressions from the :prop_tgt:`SOURCES` target property. The ``NEW``
  17. behavior for this policy is to include ``TARGET_OBJECTS`` expressions
  18. in the output.
  19. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.1
  20. .. |WARNED_OR_DID_NOT_WARN| replace:: warned
  21. .. include:: include/REMOVED_EPILOGUE.rst