From e47c609e4974d2b1597bbdef91a947fcfd94c636 Mon Sep 17 00:00:00 2001 From: Viktor Kopp Date: Mon, 16 Sep 2024 21:51:08 +0200 Subject: [PATCH] Accelerate linux build Signed-off-by: Viktor Kopp --- scripts/linux/build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/linux/build.sh b/scripts/linux/build.sh index 42ce0dca..3c36089b 100755 --- a/scripts/linux/build.sh +++ b/scripts/linux/build.sh @@ -9,6 +9,9 @@ BUILD_DIR="${SRC_DIR}/build" INSTALL_DIR="${BUILD_DIR}/install" APP_DIR_NAME="DLTViewer" +NPROC=$(nproc) +echo Nb of cpus: ${NPROC} + rm -rf "${APP_DIR_NAME}" rm -rf "${SRC_DIR}/build" mkdir -p "${BUILD_DIR}" @@ -16,7 +19,7 @@ cd "${BUILD_DIR}" echo Build with QMake qmake ../BuildDltViewer.pro -make +make -j ${NPROC} echo Cleanup rm -rf "${INSTALL_DIR}" @@ -37,7 +40,7 @@ cmake -G Ninja \ -DDLT_RESOURCE_INSTALLATION_PATH="${APP_DIR_NAME}/usr/share" \ -DDLT_PLUGIN_INSTALLATION_PATH="${APP_DIR_NAME}/usr/bin/plugins" \ "${SRC_DIR}" -cmake --build "${BUILD_DIR}" -v +cmake --build "${BUILD_DIR}" -j ${NPROC} -v # External CPack generator calls "cmake --install" and "linuxdeploy" #