summaryrefslogtreecommitdiffstats
path: root/Help/prop_tgt/AUTOMOC.rst
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-05-15 09:05:58 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-05-26 13:27:17 (GMT)
commitdbda590628868e37956838c1d93d54050ab3e7c1 (patch)
tree636949e74c8f8e398c34a6931cad4a7578aeafe9 /Help/prop_tgt/AUTOMOC.rst
parent0965002e57f7461d290792252b289fda9247d530 (diff)
downloadCMake-dbda590628868e37956838c1d93d54050ab3e7c1.zip
CMake-dbda590628868e37956838c1d93d54050ab3e7c1.tar.gz
CMake-dbda590628868e37956838c1d93d54050ab3e7c1.tar.bz2
Autogen: Per-config file suffixes. New AUTOGEN_BUILD_DIR target property.
Closes #14760 Closes #14313
Diffstat (limited to 'Help/prop_tgt/AUTOMOC.rst')
-rw-r--r--Help/prop_tgt/AUTOMOC.rst35
1 files changed, 24 insertions, 11 deletions
diff --git a/Help/prop_tgt/AUTOMOC.rst b/Help/prop_tgt/AUTOMOC.rst
index 7e10fde..81eff82 100644
--- a/Help/prop_tgt/AUTOMOC.rst
+++ b/Help/prop_tgt/AUTOMOC.rst
@@ -13,13 +13,17 @@ source files at build time and invoke moc accordingly.
* If an ``#include`` statement like ``#include "moc_<basename>.cpp"`` is found,
the ``Q_OBJECT`` or ``Q_GADGET`` macros are expected in an otherwise empty
- line of the ``<basename>.h(xx)`` header file. ``moc`` is run on the header file to
- generate ``moc_<basename>.cpp`` in the
- ``<CMAKE_CURRENT_BINARY_DIR>/<TARGETNAME>_autogen/include`` directory
- which is automatically added to the target's
- :prop_tgt:`INCLUDE_DIRECTORIES`. This allows the compiler to find the
- included ``moc_<basename>.cpp`` file regardless of the location the
- original source.
+ line of the ``<basename>.h(xx)`` header file. ``moc`` is run on the header
+ file to generate ``moc_<basename>.cpp`` in the
+ ``<AUTOGEN_BUILD_DIR>/include`` directory which is automatically added
+ to the target's :prop_tgt:`INCLUDE_DIRECTORIES`.
+ This allows the compiler to find the included ``moc_<basename>.cpp`` file
+ regardless of the location the original source.
+
+ * For multi configuration generators, except Xcode, the include directory is
+ ``<AUTOGEN_BUILD_DIR>/include_<CONFIG>``.
+
+ * See :prop_tgt:`AUTOGEN_BUILD_DIR`.
* If an ``#include`` statement like ``#include "<basename>.moc"`` is found,
then ``Q_OBJECT`` or ``Q_GADGET`` macros are expected in the current source
@@ -28,10 +32,19 @@ source files at build time and invoke moc accordingly.
* Header files that are not included by an ``#include "moc_<basename>.cpp"``
statement are nonetheless scanned for ``Q_OBJECT`` or ``Q_GADGET`` macros.
The resulting ``moc_<basename>.cpp`` files are generated in custom
- directories and automatically included in the generated
- ``<CMAKE_CURRENT_BINARY_DIR>/<TARGETNAME>_autogen/moc_compilation.cpp`` file,
- which is compiled as part of the target. The custom directories help to
- avoid name collisions for moc files with the same ``<basename>``.
+ directories and automatically included in a generated
+ ``<AUTOGEN_BUILD_DIR>/mocs_compilation.cpp`` file,
+ which is compiled as part of the target.
+
+ * For multi configuration generators, except Xcode, the file names are
+ ``moc_<basename>_<CONFIG>.cpp`` and
+ ``<AUTOGEN_BUILD_DIR>/mocs_compilation_<CONFIG>.cpp``.
+
+ * The custom directories with checksum
+ based names help to avoid name collisions for moc files with the same
+ ``<basename>``.
+
+ * See :prop_tgt:`AUTOGEN_BUILD_DIR`.
* Additionally, header files with the same base name as a source file,
(like ``<basename>.h``) or ``_p`` appended to the base name (like