diff options
author | Orkun Tokdemir <ilhanorkuntokdemir@gmail.com> | 2024-02-06 15:46:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-02-08 14:16:37 (GMT) |
commit | ccaf529c4ead74b514e694af97084871bb6bee90 (patch) | |
tree | f9234e4e8241bd7854ad61879121706166959e7c /Help/prop_tgt | |
parent | 16cc011fa56adae8946916fa457c5a833765002c (diff) | |
download | CMake-ccaf529c4ead74b514e694af97084871bb6bee90.zip CMake-ccaf529c4ead74b514e694af97084871bb6bee90.tar.gz CMake-ccaf529c4ead74b514e694af97084871bb6bee90.tar.bz2 |
Autogen: Update Documentation
* Add Qt 6 to documentation
* Add explanation about `<ORIGIN>_autogen_timestamp_deps`
Fixes: #25201
Diffstat (limited to 'Help/prop_tgt')
-rw-r--r-- | Help/prop_tgt/AUTOGEN_ORIGIN_DEPENDS.rst | 42 | ||||
-rw-r--r-- | Help/prop_tgt/AUTOGEN_PARALLEL.rst | 4 | ||||
-rw-r--r-- | Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst | 30 | ||||
-rw-r--r-- | Help/prop_tgt/AUTOMOC.rst | 10 | ||||
-rw-r--r-- | Help/prop_tgt/AUTOMOC_DEPEND_FILTERS.rst | 6 | ||||
-rw-r--r-- | Help/prop_tgt/AUTORCC.rst | 4 | ||||
-rw-r--r-- | Help/prop_tgt/AUTOUIC.rst | 6 |
7 files changed, 63 insertions, 39 deletions
diff --git a/Help/prop_tgt/AUTOGEN_ORIGIN_DEPENDS.rst b/Help/prop_tgt/AUTOGEN_ORIGIN_DEPENDS.rst index 9350a4f..33db8a7 100644 --- a/Help/prop_tgt/AUTOGEN_ORIGIN_DEPENDS.rst +++ b/Help/prop_tgt/AUTOGEN_ORIGIN_DEPENDS.rst @@ -4,20 +4,29 @@ AUTOGEN_ORIGIN_DEPENDS .. versionadded:: 3.14 Switch for forwarding origin target dependencies to the corresponding -``_autogen`` target. +:ref:`<ORIGIN>_autogen` target. + + .. note:: + + If Qt 5.15 or later is used and the generator is either :generator:`Ninja` + or :ref:`Makefile Generators`, origin target dependencies are forwarded to + the :ref:`<ORIGIN>_autogen_timestamp_deps` target instead of + :ref:`<ORIGIN>_autogen` + Targets which have their :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC` property -``ON`` have a corresponding ``_autogen`` target which generates -``moc`` and ``uic`` files. As this ``_autogen`` target is created at +``ON`` have a corresponding :ref:`<ORIGIN>_autogen` target which generates +``moc`` and ``uic`` files. As this :ref:`<ORIGIN>_autogen` target is created at generate-time, it is not possible to define dependencies of it using -e.g. :command:`add_dependencies`. Instead the -``AUTOGEN_ORIGIN_DEPENDS`` target property decides whether the origin -target dependencies should be forwarded to the ``_autogen`` target or not. +e.g. :command:`add_dependencies`. Instead the ``AUTOGEN_ORIGIN_DEPENDS`` +target property decides whether the origin target dependencies should be +forwarded to the :ref:`<ORIGIN>_autogen` target or not. By default ``AUTOGEN_ORIGIN_DEPENDS`` is initialized from :variable:`CMAKE_AUTOGEN_ORIGIN_DEPENDS` which is ``ON`` by default. -In total the dependencies of the ``_autogen`` target are composed from +In total the dependencies of the :ref:`<ORIGIN>_autogen` target are composed +from - forwarded origin target dependencies (enabled by default via ``AUTOGEN_ORIGIN_DEPENDS``) @@ -26,15 +35,14 @@ In total the dependencies of the ``_autogen`` target are composed from See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. -Note -^^^^ +.. note:: -Disabling ``AUTOGEN_ORIGIN_DEPENDS`` is useful to avoid building of -origin target dependencies when building the ``_autogen`` target only. -This is especially interesting when a -:variable:`global autogen target <CMAKE_GLOBAL_AUTOGEN_TARGET>` is enabled. + Disabling ``AUTOGEN_ORIGIN_DEPENDS`` is useful to avoid building of + origin target dependencies when building the :ref:`<ORIGIN>_autogen` target + only. This is especially interesting when a + :variable:`global autogen target <CMAKE_GLOBAL_AUTOGEN_TARGET>` is enabled. -When the ``_autogen`` target doesn't require all the origin target's -dependencies, and ``AUTOGEN_ORIGIN_DEPENDS`` is disabled, it might be -necessary to extend :prop_tgt:`AUTOGEN_TARGET_DEPENDS` to add missing -dependencies. + When the :ref:`<ORIGIN>_autogen` target doesn't require all the origin target's + dependencies, and ``AUTOGEN_ORIGIN_DEPENDS`` is disabled, it might be + necessary to extend :prop_tgt:`AUTOGEN_TARGET_DEPENDS` to add missing + dependencies. diff --git a/Help/prop_tgt/AUTOGEN_PARALLEL.rst b/Help/prop_tgt/AUTOGEN_PARALLEL.rst index 663b54e..9d34355 100644 --- a/Help/prop_tgt/AUTOGEN_PARALLEL.rst +++ b/Help/prop_tgt/AUTOGEN_PARALLEL.rst @@ -6,9 +6,9 @@ AUTOGEN_PARALLEL Number of parallel ``moc`` or ``uic`` processes to start when using :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC`. -The custom ``<origin>_autogen`` target starts a number of threads of which +The custom :ref:`<ORIGIN>_autogen` target starts a number of threads of which each one parses a source file and on demand starts a ``moc`` or ``uic`` -process. ``AUTOGEN_PARALLEL`` controls how many parallel threads +process. ``AUTOGEN_PARALLEL`` controls how many parallel threads (and therefore ``moc`` or ``uic`` processes) are started. - An empty (or unset) value or the string ``AUTO`` sets the number of diff --git a/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst b/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst index 5286d2d..13e2ef7 100644 --- a/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst +++ b/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst @@ -1,18 +1,28 @@ AUTOGEN_TARGET_DEPENDS ---------------------- -Additional target dependencies of the corresponding ``_autogen`` target. +Additional target dependencies of the corresponding :ref:`<ORIGIN>_autogen` +target. + + .. note:: + + If Qt 5.15 or later is used and the generator is either :generator:`Ninja` + or :ref:`Makefile Generators`, additional target dependencies are added to + the :ref:`<ORIGIN>_autogen_timestamp_deps` target instead of the + :ref:`<ORIGIN>_autogen` target. + Targets which have their :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC` property -``ON`` have a corresponding ``_autogen`` target which generates -``moc`` and ``uic`` files. As this ``_autogen`` target is created at -generate-time, it is not possible to define dependencies of it using -e.g. :command:`add_dependencies`. Instead the -``AUTOGEN_TARGET_DEPENDS`` target property can be set to a -:ref:`;-list <CMake Language Lists>` of additional dependencies for the -``_autogen`` target. Dependencies can be target names or file names. - -In total the dependencies of the ``_autogen`` target are composed from +``ON`` have a corresponding :ref:`<ORIGIN>_autogen` target which generates +``moc`` and ``uic`` files. As this :ref:`<ORIGIN>_autogen` target is created +at generate-time, it is not possible to define dependencies of it using e.g. +:command:`add_dependencies`. Instead the ``AUTOGEN_TARGET_DEPENDS`` target +property can be set to a :ref:`;-list <CMake Language Lists>` of additional +dependencies for the :ref:`<ORIGIN>_autogen` target. Dependencies can be target +names or file names. + +In total the dependencies of the :ref:`<ORIGIN>_autogen` target are composed +from - forwarded origin target dependencies (enabled by default via :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS`) diff --git a/Help/prop_tgt/AUTOMOC.rst b/Help/prop_tgt/AUTOMOC.rst index 6f58afb..d4f2b25 100644 --- a/Help/prop_tgt/AUTOMOC.rst +++ b/Help/prop_tgt/AUTOMOC.rst @@ -3,11 +3,13 @@ AUTOMOC Should the target be processed with auto-moc (for Qt projects). -``AUTOMOC`` is a boolean specifying whether CMake will handle the Qt -``moc`` preprocessor automatically, i.e. without having to use commands like -:module:`QT4_WRAP_CPP() <FindQt4>`, ``QT5_WRAP_CPP()``, etc. +``AUTOMOC`` is a boolean specifying whether CMake will handle the Qt ``moc`` +preprocessor automatically, i.e. without having to use commands like +:module:`QT4_WRAP_CPP() <FindQt4>`, `qt5_wrap_cpp()`_, etc. Currently, Qt versions 4 to 6 are supported. +.. _qt5_wrap_cpp(): https://doc.qt.io/qt-5/qtcore-cmake-qt5-wrap-cpp.html + This property is initialized by the value of the :variable:`CMAKE_AUTOMOC` variable if it is set when a target is created. @@ -240,7 +242,7 @@ e.g. in MSVS. :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET`: A global ``autogen`` target, that depends on all ``AUTOMOC`` or -:prop_tgt:`AUTOUIC` generated ``<ORIGIN>_autogen`` targets in the project, +:prop_tgt:`AUTOUIC` generated :ref:`<ORIGIN>_autogen` targets in the project, will be generated when this variable is ``ON``. :prop_tgt:`AUTOGEN_PARALLEL`: diff --git a/Help/prop_tgt/AUTOMOC_DEPEND_FILTERS.rst b/Help/prop_tgt/AUTOMOC_DEPEND_FILTERS.rst index c4277d7..d571f53 100644 --- a/Help/prop_tgt/AUTOMOC_DEPEND_FILTERS.rst +++ b/Help/prop_tgt/AUTOMOC_DEPEND_FILTERS.rst @@ -22,14 +22,14 @@ file gets rebuilt even when the source file itself doesn't change. If any of the extracted files is :prop_sf:`GENERATED` or if it is not in the target's sources, then it might be necessary to add it to the -``_autogen`` target dependencies. +:ref:`<ORIGIN>_autogen` target dependencies. See :prop_tgt:`AUTOGEN_TARGET_DEPENDS` for reference. By default ``AUTOMOC_DEPEND_FILTERS`` is initialized from :variable:`CMAKE_AUTOMOC_DEPEND_FILTERS`, which is empty by default. -From Qt 5.15.0 on this variable is ignored as moc is able to output the correct -dependencies. +From Qt 5.15.0 on this variable is ignored as ``moc`` is able to output the +correct dependencies. See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. diff --git a/Help/prop_tgt/AUTORCC.rst b/Help/prop_tgt/AUTORCC.rst index 33de352..fea906c 100644 --- a/Help/prop_tgt/AUTORCC.rst +++ b/Help/prop_tgt/AUTORCC.rst @@ -5,9 +5,11 @@ Should the target be processed with auto-rcc (for Qt projects). ``AUTORCC`` is a boolean specifying whether CMake will handle the Qt ``rcc`` code generator automatically, i.e. without having to use -commands like :module:`QT4_ADD_RESOURCES() <FindQt4>`, ``QT5_ADD_RESOURCES()``, +commands like :module:`QT4_ADD_RESOURCES() <FindQt4>`, `qt5_add_resources()`_, etc. Currently, Qt versions 4 to 6 are supported. +.. _`qt5_add_resources()`: https://doc.qt.io/qt-5/qtcore-cmake-qt5-add-resources.html + When this property is ``ON``, CMake will handle ``.qrc`` files added as target sources at build time and invoke ``rcc`` accordingly. This property is initialized by the value of the :variable:`CMAKE_AUTORCC` diff --git a/Help/prop_tgt/AUTOUIC.rst b/Help/prop_tgt/AUTOUIC.rst index 95366ee..5010220 100644 --- a/Help/prop_tgt/AUTOUIC.rst +++ b/Help/prop_tgt/AUTOUIC.rst @@ -5,9 +5,11 @@ Should the target be processed with auto-uic (for Qt projects). ``AUTOUIC`` is a boolean specifying whether CMake will handle the Qt ``uic`` code generator automatically, i.e. without having to use -commands like :module:`QT4_WRAP_UI() <FindQt4>`, ``QT5_WRAP_UI()``, etc. +commands like :module:`QT4_WRAP_UI() <FindQt4>`, `qt5_wrap_ui()`_, etc. Currently, Qt versions 4 to 6 are supported. +.. _`qt5_wrap_ui()`: https://doc.qt.io/qt-5/qtwidgets-cmake-qt5-wrap-ui.html + This property is initialized by the value of the :variable:`CMAKE_AUTOUIC` variable if it is set when a target is created. @@ -74,7 +76,7 @@ e.g. in MSVS. :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET`: A global ``autogen`` target, that depends on all :prop_tgt:`AUTOMOC` or -``AUTOUIC`` generated ``<ORIGIN>_autogen`` targets in the project, +``AUTOUIC`` generated :ref:`<ORIGIN>_autogen` targets in the project, will be generated when this variable is ``ON``. :prop_tgt:`AUTOGEN_PARALLEL`: |