mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 13:50:10 -05:00
Autogen: Default AUTOGEN_USE_SYSTEM_INCLUDE to ON if it is not set
Add policy CMP0151 to preserve the old behavior by default.
This commit is contained in:
committed by
Brad King
parent
033dc7ee2f
commit
7bf4e30090
@@ -57,6 +57,7 @@ Policies Introduced by CMake 3.27
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
CMP0151: AUTOMOC include directory is a system include directory by default. </policy/CMP0151>
|
||||
CMP0150: ExternalProject_Add and FetchContent_Declare treat relative git repository paths as being relative to parent project's remote. </policy/CMP0150>
|
||||
CMP0149: Visual Studio generators select latest Windows SDK by default. </policy/CMP0149>
|
||||
CMP0148: The FindPythonInterp and FindPythonLibs modules are removed. </policy/CMP0148>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
CMP0151
|
||||
-------
|
||||
|
||||
.. versionadded:: 3.27
|
||||
|
||||
AUTOMOC include directory is a system include directory by default.
|
||||
|
||||
Headers generated for :ref:`Qt AUTOMOC` are placed in target-specific include
|
||||
directories. CMake 3.26 and older added these as normal include directories.
|
||||
CMake 3.27 and newer prefer to add them as system include directories.
|
||||
This policy provides compatibility for projects that have not been updated
|
||||
to expect this.
|
||||
|
||||
If the :prop_tgt:`AUTOGEN_USE_SYSTEM_INCLUDE` target property is set,
|
||||
perhaps via the :variable:`CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE` variable,
|
||||
then its value is used regardless of the setting of this policy.
|
||||
|
||||
The ``OLD`` behavior for this policy is to add autogen include directory to
|
||||
the target's include directories.
|
||||
The ``NEW`` behavior for this policy is to add autogen include directory to
|
||||
the target's system include directories.
|
||||
|
||||
This policy was introduced in CMake version 3.27. Use the
|
||||
:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
|
||||
Unlike many policies, CMake version |release| does *not* warn
|
||||
when this policy is not set and simply uses ``OLD`` behavior.
|
||||
|
||||
.. include:: DEPRECATED.txt
|
||||
@@ -6,6 +6,9 @@ on a target to indicate that the autogen target include directory should
|
||||
be added as a system include directory or normal include directory to the
|
||||
target.
|
||||
|
||||
If this property is not set, the autogen target include directory is added
|
||||
as a system include directory by default. See policy :policy:`CMP0151`.
|
||||
|
||||
See the :manual:`cmake-qt(7)` manual for more information on using CMake
|
||||
with Qt.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user