diff options
author | Brad King <brad.king@kitware.com> | 2022-06-22 15:52:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-06-22 16:07:03 (GMT) |
commit | 9a0a94fdaaa04474ff37cb2896cda640d8013b43 (patch) | |
tree | 8d3ec7008317915b8838e26baba841e6fb30f1e8 /Help | |
parent | a7ebb73929cacecb782bc95a588c37acde1c7185 (diff) | |
download | CMake-9a0a94fdaaa04474ff37cb2896cda640d8013b43.zip CMake-9a0a94fdaaa04474ff37cb2896cda640d8013b43.tar.gz CMake-9a0a94fdaaa04474ff37cb2896cda640d8013b43.tar.bz2 |
VS: Add variable to to turn off Visual Studio compile batching
Extend the change from commit b764c7c273 (VS: Add property to turn off
Visual Studio compile batching, 2022-02-07, v3.24.0-rc1~710^2) by
adding a variable to initialize the property on every target.
Issue: #23179
Fixes: #23639
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-variables.7.rst | 1 | ||||
-rw-r--r-- | Help/prop_tgt/VS_NO_COMPILE_BATCHING.rst | 3 | ||||
-rw-r--r-- | Help/release/3.24.rst | 9 | ||||
-rw-r--r-- | Help/variable/CMAKE_VS_NO_COMPILE_BATCHING.rst | 20 |
4 files changed, 29 insertions, 4 deletions
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 9fbb146..7c8a7fa 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -516,6 +516,7 @@ Variables that Control the Build /variable/CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD /variable/CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD /variable/CMAKE_VS_JUST_MY_CODE_DEBUGGING + /variable/CMAKE_VS_NO_COMPILE_BATCHING /variable/CMAKE_VS_SDK_EXCLUDE_DIRECTORIES /variable/CMAKE_VS_SDK_EXECUTABLE_DIRECTORIES /variable/CMAKE_VS_SDK_INCLUDE_DIRECTORIES diff --git a/Help/prop_tgt/VS_NO_COMPILE_BATCHING.rst b/Help/prop_tgt/VS_NO_COMPILE_BATCHING.rst index a3fe77c..e14ae58 100644 --- a/Help/prop_tgt/VS_NO_COMPILE_BATCHING.rst +++ b/Help/prop_tgt/VS_NO_COMPILE_BATCHING.rst @@ -10,6 +10,9 @@ a time set ``VS_NO_COMPILE_BATCHING`` to ON. If this flag is set MSBuild will call compiler with one c/cpp file at a time. Useful when you want to use tool that replaces the compiler, for example some build caching tool. +This property is initialized by the :variable:`CMAKE_VS_NO_COMPILE_BATCHING` +variable if it is set when a target is created. + Example ^^^^^^^ diff --git a/Help/release/3.24.rst b/Help/release/3.24.rst index d0db764..ce05816 100644 --- a/Help/release/3.24.rst +++ b/Help/release/3.24.rst @@ -154,6 +154,11 @@ Variables were added to enable build rules that verify all headers in header sets can be used on their own. +* The :variable:`CMAKE_VS_NO_COMPILE_BATCHING` variable and corresponding + :prop_tgt:`VS_NO_COMPILE_BATCHING` target property were added to + tell :ref:`Visual Studio Generators` whether to disable compiler + parallelism and call the compiler with one source file at a time. + * The :variable:`CMAKE_WATCOM_RUNTIME_LIBRARY` variable and :prop_tgt:`WATCOM_RUNTIME_LIBRARY` target property were introduced to select the runtime library used by compilers targeting the Watcom ABI. @@ -185,10 +190,6 @@ Properties than one ``static void Main(string[])`` function signature is available in a managed .NET project. -* The :prop_tgt:`VS_NO_COMPILE_BATCHING` target property was added to - tell :ref:`Visual Studio Generators` whether to disable compiler parallelism - and call the compiler with one source file at a time. - Modules ------- diff --git a/Help/variable/CMAKE_VS_NO_COMPILE_BATCHING.rst b/Help/variable/CMAKE_VS_NO_COMPILE_BATCHING.rst new file mode 100644 index 0000000..2fb163e --- /dev/null +++ b/Help/variable/CMAKE_VS_NO_COMPILE_BATCHING.rst @@ -0,0 +1,20 @@ +CMAKE_VS_NO_COMPILE_BATCHING +---------------------------- + +.. versionadded:: 3.24 + +Turn off compile batching when using :ref:`Visual Studio Generators`. + +This variable is used to initialize the :prop_tgt:`VS_NO_COMPILE_BATCHING` +property on all targets when they are created. See that target property for +additional information. + +Example +^^^^^^^ + +This shows setting the property for the target ``foo`` using the variable. + +.. code-block:: cmake + + set(CMAKE_VS_NO_COMPILE_BATCHING ON) + add_library(foo SHARED foo.cpp) |