Procházet zdrojové kódy

Autogen: Add (CMAKE_)AUTOGEN_ORIGIN_DEPENDS documentation

Sebastian Holtermann před 7 roky
rodič
revize
0669de5d36

+ 1 - 0
Help/manual/cmake-properties.7.rst

@@ -124,6 +124,7 @@ Properties on Targets
    /prop_tgt/ARCHIVE_OUTPUT_NAME_CONFIG
    /prop_tgt/ARCHIVE_OUTPUT_NAME
    /prop_tgt/AUTOGEN_BUILD_DIR
+   /prop_tgt/AUTOGEN_ORIGIN_DEPENDS
    /prop_tgt/AUTOGEN_PARALLEL
    /prop_tgt/AUTOGEN_TARGET_DEPENDS
    /prop_tgt/AUTOMOC_COMPILER_PREDEFINES

+ 1 - 0
Help/manual/cmake-variables.7.rst

@@ -309,6 +309,7 @@ Variables that Control the Build
    /variable/CMAKE_ANDROID_STL_TYPE
    /variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY
    /variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY_CONFIG
+   /variable/CMAKE_AUTOGEN_ORIGIN_DEPENDS
    /variable/CMAKE_AUTOGEN_PARALLEL
    /variable/CMAKE_AUTOGEN_VERBOSE
    /variable/CMAKE_AUTOMOC

+ 26 - 0
Help/prop_tgt/AUTOGEN_ORIGIN_DEPENDS.rst

@@ -0,0 +1,26 @@
+AUTOGEN_ORIGIN_DEPENDS
+----------------------
+
+Switch for forwarding origin target dependencies to the corresponding
+``_autogen`` target.
+
+Targets which have their :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC` property
+``ON`` have a corresponding ``_autogen`` target which is used to auto generate
+``moc`` and ``uic`` files.  As this ``_autogen`` target is created at
+generate-time, it is not possible to define dependencies of it,
+such as to create inputs for the ``moc`` or ``uic`` executable.
+
+The dependencies of the ``_autogen`` target are composed from
+
+- the origin target dependencies
+  (by default enabled via :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS`)
+- user defined dependencies from :prop_tgt:`AUTOGEN_TARGET_DEPENDS`
+
+:prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` decides whether the origin target
+dependencies should be forwarded to the ``_autogen`` target or not.
+
+By default :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` is initialized from
+:variable:`CMAKE_AUTOGEN_ORIGIN_DEPENDS` which is ``ON`` by default.
+
+See the :manual:`cmake-qt(7)` manual for more information on using CMake
+with Qt.

+ 9 - 3
Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst

@@ -9,9 +9,15 @@ Targets which have their :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC` property
 generate-time, it is not possible to define dependencies of it,
 such as to create inputs for the ``moc`` or ``uic`` executable.
 
-The :prop_tgt:`AUTOGEN_TARGET_DEPENDS` target property can be set instead to a
-list of dependencies of the ``_autogen`` target.  Dependencies can be target
-names or file names.
+The dependencies of the ``_autogen`` target are composed from
+
+- the origin target dependencies
+  (by default enabled via :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS`)
+- user defined dependencies from :prop_tgt:`AUTOGEN_TARGET_DEPENDS`
+
+The :prop_tgt:`AUTOGEN_TARGET_DEPENDS` target property can be set to a
+list of additional dependencies for the ``_autogen`` target.  Dependencies
+can be target names or file names.
 
 See the :manual:`cmake-qt(7)` manual for more information on using CMake
 with Qt.

+ 11 - 0
Help/variable/CMAKE_AUTOGEN_ORIGIN_DEPENDS.rst

@@ -0,0 +1,11 @@
+CMAKE_AUTOGEN_ORIGIN_DEPENDS
+----------------------------
+
+Switch for forwarding origin target dependencies to the corresponding
+``_autogen`` targets.
+
+This variable is used to initialize the :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS`
+property on all the targets.  See that target property for additional
+information.
+
+By default :variable:`CMAKE_AUTOGEN_ORIGIN_DEPENDS` is ``ON``.