diff options
author | Craig Scott <craig.scott@crascit.com> | 2019-11-10 20:55:29 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-11-10 20:55:43 (GMT) |
commit | b613eecfa04400779835e62089410c31a070d2de (patch) | |
tree | 86f3862de2c8686f6762da7163ab35fd9a3e76cb /Help/variable | |
parent | a9c09599002baa27bdf4f98664829a92ba529240 (diff) | |
parent | fcacd8ce8d8843922bd2779f1774425433dfd9cc (diff) | |
download | CMake-b613eecfa04400779835e62089410c31a070d2de.zip CMake-b613eecfa04400779835e62089410c31a070d2de.tar.gz CMake-b613eecfa04400779835e62089410c31a070d2de.tar.bz2 |
Merge topic 'docs-UNITY_BUILD'
fcacd8ce8d Help: Improve readability and fix inaccuracies in unity build docs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4019
Diffstat (limited to 'Help/variable')
-rw-r--r-- | Help/variable/CMAKE_UNITY_BUILD.rst | 18 | ||||
-rw-r--r-- | Help/variable/CMAKE_UNITY_BUILD_BATCH_SIZE.rst | 7 |
2 files changed, 17 insertions, 8 deletions
diff --git a/Help/variable/CMAKE_UNITY_BUILD.rst b/Help/variable/CMAKE_UNITY_BUILD.rst index bbcfd68..a86cd67 100644 --- a/Help/variable/CMAKE_UNITY_BUILD.rst +++ b/Help/variable/CMAKE_UNITY_BUILD.rst @@ -1,11 +1,19 @@ CMAKE_UNITY_BUILD ----------------- -Initializes the :prop_tgt:`UNITY_BUILD` target property on targets -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. +This variable is used to initialize the :prop_tgt:`UNITY_BUILD` +property of targets when they are created. Setting it to true +enables batch compilation of multiple sources within each target. +This feature is known as a *Unity* or *Jumbo* build. + +Projects should not set this variable, it is intended as a developer +control to be set on the :manual:`cmake(1)` command line or other +equivalent methods. The developer must have the ability to enable or +disable unity builds according to the capabilities of their own machine +and compiler. + +By default, this variable is not set, which will result in unity builds +being disabled. .. note:: This option currently does not work well in combination with diff --git a/Help/variable/CMAKE_UNITY_BUILD_BATCH_SIZE.rst b/Help/variable/CMAKE_UNITY_BUILD_BATCH_SIZE.rst index 3ab2344..7988d4b 100644 --- a/Help/variable/CMAKE_UNITY_BUILD_BATCH_SIZE.rst +++ b/Help/variable/CMAKE_UNITY_BUILD_BATCH_SIZE.rst @@ -1,6 +1,7 @@ CMAKE_UNITY_BUILD_BATCH_SIZE ---------------------------- -Default value for :prop_tgt:`UNITY_BUILD_BATCH_SIZE` of targets. - -By default ``CMAKE_UNITY_BUILD_BATCH_SIZE`` is set to ``8``. +This variable is used to initialize the :prop_tgt:`UNITY_BUILD_BATCH_SIZE` +property of targets when they are created. It specifies the default upper +limit on the number of source files that may be combined in any one unity +source file when unity builds are enabled for a target. |