VS_NO_COMPILE_BATCHING.rst 842 B

123456789101112131415161718192021222324
  1. VS_NO_COMPILE_BATCHING
  2. ----------------------
  3. .. versionadded:: 3.24
  4. Turn off compile batching for the target. Usually MSBuild calls the compiler
  5. with multiple c/cpp files and compiler starts subprocesses for each file to
  6. make the build parallel. If you want compiler to be invoked with one file at
  7. a time set ``VS_NO_COMPILE_BATCHING`` to ON. If this flag is set MSBuild will
  8. call compiler with one c/cpp file at a time. Useful when you want to use tool
  9. that replaces the compiler, for example some build caching tool.
  10. This property is initialized by the :variable:`CMAKE_VS_NO_COMPILE_BATCHING`
  11. variable if it is set when a target is created.
  12. Example
  13. ^^^^^^^
  14. This shows setting the property for the target ``foo``.
  15. .. code-block:: cmake
  16. add_library(foo SHARED foo.cpp)
  17. set_property(TARGET foo PROPERTY VS_NO_COMPILE_BATCHING ON)