diff options
author | Brad King <brad.king@kitware.com> | 2017-10-02 12:01:02 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-10-02 12:01:21 (GMT) |
commit | 275b4a53eef8d10af069fbcb0d1d9bc4d0b5f6d5 (patch) | |
tree | 1863a4e43cd68b578996eade2522c55c0d90e0e9 /Help/prop_tgt | |
parent | 9288c291cb56f75ad0ed8a86b0882d1998c8b79d (diff) | |
parent | 6bbc1e775d46cbe1ad97ecea0862d030680b332a (diff) | |
download | CMake-275b4a53eef8d10af069fbcb0d1d9bc4d0b5f6d5.zip CMake-275b4a53eef8d10af069fbcb0d1d9bc4d0b5f6d5.tar.gz CMake-275b4a53eef8d10af069fbcb0d1d9bc4d0b5f6d5.tar.bz2 |
Merge topic 'autogen-predefs'
6bbc1e77 Autogen: Add release notes for (CMAKE_)AUTOMOC_COMPILER_PREDEFINES
75c98b5e Autogen: Doc: Add documentation for (CMAKE_)AUTOMOC_COMPILER_PREDEFINES
1d7f099d Autogen: Add (CMAKE_)AUTOMOC_COMPILER_PREDEFINES
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1328
Diffstat (limited to 'Help/prop_tgt')
-rw-r--r-- | Help/prop_tgt/AUTOMOC.rst | 3 | ||||
-rw-r--r-- | Help/prop_tgt/AUTOMOC_COMPILER_PREDEFINES.rst | 24 |
2 files changed, 27 insertions, 0 deletions
diff --git a/Help/prop_tgt/AUTOMOC.rst b/Help/prop_tgt/AUTOMOC.rst index 641ac09..9e5261f 100644 --- a/Help/prop_tgt/AUTOMOC.rst +++ b/Help/prop_tgt/AUTOMOC.rst @@ -76,6 +76,9 @@ Additional macro names to search for can be added to :prop_tgt:`AUTOMOC_MACRO_NA Additional ``moc`` dependency file names can be extracted from source code by using :prop_tgt:`AUTOMOC_DEPEND_FILTERS`. +Compiler pre definitions for ``moc`` are written to a ``moc_predefs.h`` file +which is controlled by :prop_tgt:`AUTOMOC_COMPILER_PREDEFINES`. + Source C++ files can be excluded from :prop_tgt:`AUTOMOC` processing by enabling :prop_sf:`SKIP_AUTOMOC` or the broader :prop_sf:`SKIP_AUTOGEN`. 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. |