Browse Source

build: enable parallel builds in msbuild using MTT (#17708)

* build: enable parallel builds in msbuild using MTT

* check LLAMA_STANDALONE
Jeff Bolz 1 month ago
parent
commit
d8b5cdc4fe
1 changed files with 6 additions and 0 deletions
  1. 6 0
      CMakeLists.txt

+ 6 - 0
CMakeLists.txt

@@ -72,6 +72,12 @@ if (MSVC)
     add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/bigobj>")
 endif()
 
+if (LLAMA_STANDALONE)
+    # enable parallel builds for msbuild
+    list(APPEND CMAKE_VS_GLOBALS UseMultiToolTask=true)
+    list(APPEND CMAKE_VS_GLOBALS EnforceProcessCountAcrossBuilds=true)
+endif()
+
 if (CMAKE_SYSTEM_NAME STREQUAL "iOS")
     set(LLAMA_TOOLS_INSTALL_DEFAULT OFF)
 else()