1CMP0051 2------- 3 4.. versionadded:: 3.1 5 6List :genex:`TARGET_OBJECTS` in SOURCES target property. 7 8CMake 3.0 and lower did not include the ``TARGET_OBJECTS`` 9:manual:`generator expression <cmake-generator-expressions(7)>` when 10returning the :prop_tgt:`SOURCES` target property. 11 12Configure-time CMake code is not able to handle generator expressions. If 13using the :prop_tgt:`SOURCES` target property at configure time, it may be 14necessary to first remove generator expressions using the 15:command:`string(GENEX_STRIP)` command. Generate-time CMake code such as 16:command:`file(GENERATE)` can handle the content without stripping. 17 18The ``OLD`` behavior for this policy is to omit ``TARGET_OBJECTS`` 19expressions from the :prop_tgt:`SOURCES` target property. The ``NEW`` 20behavior for this policy is to include ``TARGET_OBJECTS`` expressions 21in the output. 22 23This policy was introduced in CMake version 3.1. 24CMake version |release| warns when the policy is not set and uses 25``OLD`` behavior. Use the :command:`cmake_policy` command to set it 26to ``OLD`` or ``NEW`` explicitly. 27 28.. include:: DEPRECATED.txt 29