Help: Document CMAKE_UNITY_BUILD/CMAKE_EXPORT_COMPILE_COMMANDS limitation

These two options currently do not work well together.  Mention this
limitation in the documentation.

Issue: #19826
This commit is contained in:
Brad King 2019-10-11 08:05:59 -04:00
parent ed06d27c7f
commit 13c8dbd5a6
3 changed files with 14 additions and 0 deletions

View File

@ -26,6 +26,12 @@ The batching of source files is done by adding new sources files
which will ``#include`` the source files, and exclude them from
building by setting :prop_sf:`HEADER_FILE_ONLY` to ``ON``.
.. note::
Marking the original sources with :prop_sf:`HEADER_FILE_ONLY`
is considered an implementation detail that may change in the
future because it does not work well in combination with
the :variable:`CMAKE_EXPORT_COMPILE_COMMANDS` variable.
ODR (One definition rule) errors
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -28,3 +28,7 @@ form. The format of the JSON file looks like:
.. note::
This option is implemented only by :ref:`Makefile Generators`
and the :generator:`Ninja`. It is ignored on other generators.
This option currently does not work well in combination with
the :prop_tgt:`UNITY_BUILD` target property or the
:variable:`CMAKE_UNITY_BUILD` variable.

View File

@ -6,3 +6,7 @@ as they are created. Set to ``ON`` to batch compilation of multiple
sources within each target. This feature is known as "Unity build",
or "Jumbo build". By default this variable is not set and so does
not enable unity builds on targets.
.. note::
This option currently does not work well in combination with
the :variable:`CMAKE_EXPORT_COMPILE_COMMANDS` variable.