Explorar o código

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

* build: enable parallel builds in msbuild using MTT

* check LLAMA_STANDALONE
Jeff Bolz hai 1 mes
pai
achega
d8b5cdc4fe
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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()