Skip to content

Commit d8b5cdc

Browse files
authored
build: enable parallel builds in msbuild using MTT (#17708)
* build: enable parallel builds in msbuild using MTT * check LLAMA_STANDALONE
1 parent dea9ba2 commit d8b5cdc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ if (MSVC)
7272
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/bigobj>")
7373
endif()
7474

75+
if (LLAMA_STANDALONE)
76+
# enable parallel builds for msbuild
77+
list(APPEND CMAKE_VS_GLOBALS UseMultiToolTask=true)
78+
list(APPEND CMAKE_VS_GLOBALS EnforceProcessCountAcrossBuilds=true)
79+
endif()
80+
7581
if (CMAKE_SYSTEM_NAME STREQUAL "iOS")
7682
set(LLAMA_TOOLS_INSTALL_DEFAULT OFF)
7783
else()

0 commit comments

Comments
 (0)