summaryrefslogtreecommitdiffstats
path: root/Help/prop_tgt/AUTOMOC_COMPILER_PREDEFINES.rst
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-09-29 10:10:53 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-09-29 13:00:47 (GMT)
commit75c98b5ef4eae201f259cf1c599fe49fc407b4d4 (patch)
tree6048143989e2d9e5bcdeaf9bb177a6ac3c8fceb9 /Help/prop_tgt/AUTOMOC_COMPILER_PREDEFINES.rst
parent1d7f099d9cf489872a70b7616ff644cd4a91a7ae (diff)
downloadCMake-75c98b5ef4eae201f259cf1c599fe49fc407b4d4.zip
CMake-75c98b5ef4eae201f259cf1c599fe49fc407b4d4.tar.gz
CMake-75c98b5ef4eae201f259cf1c599fe49fc407b4d4.tar.bz2
Autogen: Doc: Add documentation for (CMAKE_)AUTOMOC_COMPILER_PREDEFINES
Also adds the documentation for CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND. Closes #17275
Diffstat (limited to 'Help/prop_tgt/AUTOMOC_COMPILER_PREDEFINES.rst')
-rw-r--r--Help/prop_tgt/AUTOMOC_COMPILER_PREDEFINES.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/Help/prop_tgt/AUTOMOC_COMPILER_PREDEFINES.rst b/Help/prop_tgt/AUTOMOC_COMPILER_PREDEFINES.rst
new file mode 100644
index 0000000..57a647f
--- /dev/null
+++ b/Help/prop_tgt/AUTOMOC_COMPILER_PREDEFINES.rst
@@ -0,0 +1,24 @@
+AUTOMOC_COMPILER_PREDEFINES
+---------------------------
+
+Boolean value used by :prop_tgt:`AUTOMOC` to determine if the
+compiler pre definitions file ``moc_predefs.h`` should be generated.
+
+CMake generates a ``moc_predefs.h`` file with compiler pre definitions
+from the output of the command defined in
+:variable:`CMAKE_CXX_COMPILER_PREDEFINES_COMMAND <CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND>`
+when
+
+- :prop_tgt:`AUTOMOC` is enabled,
+- :prop_tgt:`AUTOMOC_COMPILER_PREDEFINES` is enabled,
+- :variable:`CMAKE_CXX_COMPILER_PREDEFINES_COMMAND <CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND>` isn't empty and
+- the Qt version is greater or equal 5.8.
+
+The ``moc_predefs.h`` file, which is generated in :prop_tgt:`AUTOGEN_BUILD_DIR`,
+is passed to ``moc`` as the argument to the ``--include`` option.
+
+By default :prop_tgt:`AUTOMOC_COMPILER_PREDEFINES` is initialized from
+:variable:`CMAKE_AUTOMOC_COMPILER_PREDEFINES`, which is ON by default.
+
+See the :manual:`cmake-qt(7)` manual for more information on using CMake
+with Qt.