From 0911d54c31433f6c027e133eab0c84564e193317 Mon Sep 17 00:00:00 2001 From: Gobrosse Date: Tue, 9 Jul 2024 13:20:49 +0200 Subject: [PATCH] added BUILD_JOBS --- config-amdgpu.sh.template | 1 + config.sh.template | 1 + setup.sh | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config-amdgpu.sh.template b/config-amdgpu.sh.template index 35a96c9..2df3c04 100644 --- a/config-amdgpu.sh.template +++ b/config-amdgpu.sh.template @@ -1,5 +1,6 @@ # use Debug or Release : ${BUILD_TYPE:=Debug} +: ${BUILD_JOBS:="8"} : ${CMAKE_MAKE:=""} diff --git a/config.sh.template b/config.sh.template index ac1dd95..31a11b8 100644 --- a/config.sh.template +++ b/config.sh.template @@ -1,5 +1,6 @@ # use Debug or Release : ${BUILD_TYPE:=Debug} +: ${BUILD_JOBS:="8"} : ${CMAKE_MAKE:=""} diff --git a/setup.sh b/setup.sh index 8bb7aa3..70bca58 100755 --- a/setup.sh +++ b/setup.sh @@ -40,7 +40,12 @@ source config.sh CUR=`pwd` -MAKE="cmake --build . --config ${BUILD_TYPE}" +if [ ! -v BUILD_JOBS ]; then + echo "Please specify BUILD_JOBS in the config.sh file" + exit -1 +fi + +MAKE="cmake --build . --config ${BUILD_TYPE} -j ${BUILD_JOBS}" MAKE_INSTALL="cmake --install . --config ${BUILD_TYPE}" function remote {