Merge topic 'vs_buildcache_support'

b764c7c273 VS: Add property to turn off Visual Studio compile batching

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6957
This commit is contained in:
Brad King
2022-02-09 13:59:39 +00:00
committed by Kitware Robot
8 changed files with 73 additions and 1 deletions
+1
View File
@@ -402,6 +402,7 @@ Properties on Targets
/prop_tgt/VS_JUST_MY_CODE_DEBUGGING
/prop_tgt/VS_KEYWORD
/prop_tgt/VS_MOBILE_EXTENSIONS_VERSION
/prop_tgt/VS_NO_COMPILE_BATCHING
/prop_tgt/VS_NO_SOLUTION_DEPLOY
/prop_tgt/VS_PACKAGE_REFERENCES
/prop_tgt/VS_PLATFORM_TOOLSET
+21
View File
@@ -0,0 +1,21 @@
VS_NO_COMPILE_BATCHING
----------------------
.. versionadded:: 3.24
Turn off compile batching for the target. Usually MSBuild calls the compiler
with multiple c/cpp files and compiler starts subprocesses for each file to
make the build parallel. If you want compiler to be invoked with one file at
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.
Example
^^^^^^^
This shows setting the variable for the target foo.
.. code-block:: cmake
add_library(foo SHARED foo.cpp)
set_property(TARGET foo PROPERTY VS_NO_COMPILE_BATCHING ON)
@@ -0,0 +1,6 @@
vs_buildcache_support
---------------------
* 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 c/cpp file at a time.