From 3612717297ec7cc225334b724a2f13da160430f1 Mon Sep 17 00:00:00 2001 From: Boris Basic <boris.basic@edf.fr> Date: Thu, 15 Dec 2022 13:50:58 +0100 Subject: [PATCH] Set the number of build processes to half the number of cores --- build-telemac-deps.bat | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build-telemac-deps.bat b/build-telemac-deps.bat index baa2085..e783e82 100644 --- a/build-telemac-deps.bat +++ b/build-telemac-deps.bat @@ -347,13 +347,16 @@ rem * CMake build function * rem ************************ set lib=%~1 +rem Set the number of build processes +set /a build_proc=%number_of_processors%/2 + if %compiler% == mingw ( set cmake_config_options=%cmake_config_options% -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release - set cmake_build_options=-j 4 + set cmake_build_options=-j %build_proc% ) else ( if %compiler% == intel ( set cmake_config_options=%cmake_config_options% -G "Visual Studio 16 2019" -A x64 -T "Intel C++ Compiler 19.2" -DCMAKE_CONFIGURATION_TYPES:STRING=Release - set cmake_build_options=--config Release -j 4 + set cmake_build_options=--config Release -j %build_proc% ) else ( echo Unknown compiler: %compiler%. exit /b 1 -- GitLab