1CMAKE_GLOBAL_AUTOGEN_TARGET 2--------------------------- 3 4.. versionadded:: 3.14 5 6Switch to enable generation of a global ``autogen`` target. 7 8When :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET` is enabled, a custom target 9``autogen`` is generated. This target depends on all :prop_tgt:`AUTOMOC` and 10:prop_tgt:`AUTOUIC` generated ``<ORIGIN>_autogen`` targets in the project. 11By building the global ``autogen`` target, all :prop_tgt:`AUTOMOC` and 12:prop_tgt:`AUTOUIC` files in the project will be generated. 13 14The name of the global ``autogen`` target can be changed by setting 15:variable:`CMAKE_GLOBAL_AUTOGEN_TARGET_NAME`. 16 17By default :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET` is unset. 18 19See the :manual:`cmake-qt(7)` manual for more information on using CMake 20with Qt. 21 22Note 23^^^^ 24 25``<ORIGIN>_autogen`` targets by default inherit their origin target's 26dependencies. This might result in unintended dependency target 27builds when only ``<ORIGIN>_autogen`` targets are built. A solution is to 28disable :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` on the respective origin targets. 29