summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-04 13:00:51 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-05-04 13:01:08 (GMT)
commit28dd02c3ba9dafb3df614565ec83223f61f30280 (patch)
treedac83df715fdfc46c6cf25e66ee2b59085aa89b8 /Help
parent7a4ec8d6cc3226185f4a04db7421d9414b1cada7 (diff)
parent7bf4e3009000b0ab576f364abc779e9a1599af08 (diff)
downloadCMake-28dd02c3ba9dafb3df614565ec83223f61f30280.zip
CMake-28dd02c3ba9dafb3df614565ec83223f61f30280.tar.gz
CMake-28dd02c3ba9dafb3df614565ec83223f61f30280.tar.bz2
Merge topic 'autogen-system-include'
7bf4e30090 Autogen: Default AUTOGEN_USE_SYSTEM_INCLUDE to ON if it is not set 033dc7ee2f Autogen: Add AUTOGEN_USE_SYSTEM_INCLUDE target property 8ba16db163 Tests/RunCMake: Add option for dynamic expected output Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8400
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-policies.7.rst1
-rw-r--r--Help/manual/cmake-properties.7.rst1
-rw-r--r--Help/manual/cmake-variables.7.rst1
-rw-r--r--Help/policy/CMP0151.rst28
-rw-r--r--Help/prop_tgt/AUTOGEN_USE_SYSTEM_INCLUDE.rst17
-rw-r--r--Help/release/dev/autogen-system-include.rst7
-rw-r--r--Help/variable/CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE.rst10
7 files changed, 65 insertions, 0 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index ff57390..7c48806 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -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>
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index c0e2ee2..8ee5573 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -133,6 +133,7 @@ Properties on Targets
/prop_tgt/AUTOGEN_ORIGIN_DEPENDS
/prop_tgt/AUTOGEN_PARALLEL
/prop_tgt/AUTOGEN_TARGET_DEPENDS
+ /prop_tgt/AUTOGEN_USE_SYSTEM_INCLUDE
/prop_tgt/AUTOMOC
/prop_tgt/AUTOMOC_COMPILER_PREDEFINES
/prop_tgt/AUTOMOC_DEPEND_FILTERS
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 34d2c50..8b055b0 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -397,6 +397,7 @@ Variables that Control the Build
/variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY_CONFIG
/variable/CMAKE_AUTOGEN_ORIGIN_DEPENDS
/variable/CMAKE_AUTOGEN_PARALLEL
+ /variable/CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE
/variable/CMAKE_AUTOGEN_VERBOSE
/variable/CMAKE_AUTOMOC
/variable/CMAKE_AUTOMOC_COMPILER_PREDEFINES
diff --git a/Help/policy/CMP0151.rst b/Help/policy/CMP0151.rst
new file mode 100644
index 0000000..c12f595
--- /dev/null
+++ b/Help/policy/CMP0151.rst
@@ -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
diff --git a/Help/prop_tgt/AUTOGEN_USE_SYSTEM_INCLUDE.rst b/Help/prop_tgt/AUTOGEN_USE_SYSTEM_INCLUDE.rst
new file mode 100644
index 0000000..84212c8
--- /dev/null
+++ b/Help/prop_tgt/AUTOGEN_USE_SYSTEM_INCLUDE.rst
@@ -0,0 +1,17 @@
+AUTOGEN_USE_SYSTEM_INCLUDE
+--------------------------
+
+``AUTOGEN_USE_SYSTEM_INCLUDE`` is a boolean property that can be set
+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.
+
+This property is initialized by the
+:variable:`CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE` variable if it is set when
+a target is created.
diff --git a/Help/release/dev/autogen-system-include.rst b/Help/release/dev/autogen-system-include.rst
new file mode 100644
index 0000000..aea81be
--- /dev/null
+++ b/Help/release/dev/autogen-system-include.rst
@@ -0,0 +1,7 @@
+autogen-system-include
+----------------------
+
+* The :prop_tgt:`AUTOGEN_USE_SYSTEM_INCLUDE` target property and
+ corresponding :variable:`CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE` were
+ added to explicitly control whether autogen headers are
+ considered system headers.
diff --git a/Help/variable/CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE.rst b/Help/variable/CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE.rst
new file mode 100644
index 0000000..80ed847
--- /dev/null
+++ b/Help/variable/CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE.rst
@@ -0,0 +1,10 @@
+CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE
+--------------------------------
+
+.. versionadded:: 3.27
+
+This variable is used to initialize the :prop_tgt:`AUTOGEN_USE_SYSTEM_INCLUDE`
+property on all targets as they are created. See that target property for
+additional information.
+
+By default ``CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE`` is unset.