Orkun Tokdemir | 7bf4e30 | 2023-04-27 11:28:30 +0200 | [diff] [blame^] | 1 | CMP0151 |
| 2 | ------- |
| 3 | |
| 4 | .. versionadded:: 3.27 |
| 5 | |
| 6 | AUTOMOC include directory is a system include directory by default. |
| 7 | |
| 8 | Headers generated for :ref:`Qt AUTOMOC` are placed in target-specific include |
| 9 | directories. CMake 3.26 and older added these as normal include directories. |
| 10 | CMake 3.27 and newer prefer to add them as system include directories. |
| 11 | This policy provides compatibility for projects that have not been updated |
| 12 | to expect this. |
| 13 | |
| 14 | If the :prop_tgt:`AUTOGEN_USE_SYSTEM_INCLUDE` target property is set, |
| 15 | perhaps via the :variable:`CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE` variable, |
| 16 | then its value is used regardless of the setting of this policy. |
| 17 | |
| 18 | The ``OLD`` behavior for this policy is to add autogen include directory to |
| 19 | the target's include directories. |
| 20 | The ``NEW`` behavior for this policy is to add autogen include directory to |
| 21 | the target's system include directories. |
| 22 | |
| 23 | This policy was introduced in CMake version 3.27. Use the |
| 24 | :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. |
| 25 | Unlike many policies, CMake version |release| does *not* warn |
| 26 | when this policy is not set and simply uses ``OLD`` behavior. |
| 27 | |
| 28 | .. include:: DEPRECATED.txt |