1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00
Files
CMake/Help/variable/CMAKE_GLOBAL_AUTOGEN_TARGET.rst
Kitware Robot 496ec6036f Help: Add Sphinx 'versionadded' directives to each top-level document
Run the `Utilities/Sphinx/update_versions.py` script to add initial
markup to every top-level document and find module.

Issue: #19715
2020-07-06 10:23:20 -04:00

29 lines
1.0 KiB
ReStructuredText

CMAKE_GLOBAL_AUTOGEN_TARGET
---------------------------
.. versionadded:: 3.14
Switch to enable generation of a global ``autogen`` target.
When :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET` is enabled, a custom target
``autogen`` is generated. This target depends on all :prop_tgt:`AUTOMOC` and
:prop_tgt:`AUTOUIC` generated ``<ORIGIN>_autogen`` targets in the project.
By building the global ``autogen`` target, all :prop_tgt:`AUTOMOC` and
:prop_tgt:`AUTOUIC` files in the project will be generated.
The name of the global ``autogen`` target can be changed by setting
:variable:`CMAKE_GLOBAL_AUTOGEN_TARGET_NAME`.
By default :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET` is unset.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.
Note
^^^^
``<ORIGIN>_autogen`` targets by default inherit their origin target's
dependencies. This might result in unintended dependency target
builds when only ``<ORIGIN>_autogen`` targets are built. A solution is to
disable :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` on the respective origin targets.