From d8b5cdc4fecd6d65a727cf9f6d6b4f4c5bdf1296 Mon Sep 17 00:00:00 2001 From: Jeff Bolz Date: Wed, 3 Dec 2025 22:42:29 -0600 Subject: [PATCH] build: enable parallel builds in msbuild using MTT (#17708) * build: enable parallel builds in msbuild using MTT * check LLAMA_STANDALONE --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1085b545a9..11c9b878e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,12 @@ if (MSVC) add_compile_options("$<$:/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()