From 1fd929c0f1a50b8fbe9d3c6fc249ea07b64b2ad6 Mon Sep 17 00:00:00 2001 From: Hugo Devillers Date: Thu, 27 Jun 2024 20:28:37 +0200 Subject: [PATCH 1/3] add seperate configuration item for 'install' cmd --- config-amdgpu.sh.template | 2 ++ config.sh.template | 2 ++ setup.sh | 6 ++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config-amdgpu.sh.template b/config-amdgpu.sh.template index 3f2c31b..be8e2df 100644 --- a/config-amdgpu.sh.template +++ b/config-amdgpu.sh.template @@ -3,10 +3,12 @@ : ${CMAKE_MAKE:=""} : ${MAKE:="make -j4"} +: ${MAKE_INSTALL:="make install"} # use this for ninja instead of make #: ${CMAKE_MAKE:="-G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DLLVM_PARALLEL_COMPILE_JOBS=4 -DLLVM_PARALLEL_LINK_JOBS=1"} #: ${MAKE:="ninja"} +#: ${MAKE_INSTALL:="ninja install"} # set this to true if you don't have a github account : ${HTTPS:=true} diff --git a/config.sh.template b/config.sh.template index 182a2ed..53d6cf5 100644 --- a/config.sh.template +++ b/config.sh.template @@ -3,10 +3,12 @@ : ${CMAKE_MAKE:=""} : ${MAKE:="make -j4"} +: ${MAKE_INSTALL:="make install"} # use this for ninja instead of make #: ${CMAKE_MAKE:="-G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DLLVM_PARALLEL_COMPILE_JOBS=4 -DLLVM_PARALLEL_LINK_JOBS=1"} #: ${MAKE:="ninja"} +#: ${MAKE_INSTALL:="ninja install"} # set this to true if you don't have a github account : ${HTTPS:=true} diff --git a/setup.sh b/setup.sh index 3c434e5..e5e7e95 100755 --- a/setup.sh +++ b/setup.sh @@ -83,7 +83,8 @@ if [ "${CMAKE-}" == true ]; then cd cmake_build cmake ../CMake -DBUILD_CursesDialog:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH="${CUR}/cmake_install" - ${MAKE} install + ${MAKE} + ${MAKE_INSTALL} cd "${CUR}" export PATH="${CUR}/cmake_install/bin:${PATH}" @@ -130,7 +131,8 @@ if [ "${LLVM-}" == true ]; then fi cmake ../llvm-project/llvm ${CMAKE_MAKE} -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON -DLLVM_LINK_LLVM_DYLIB:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH="${CUR}/llvm_install" \ -DLLVM_ENABLE_RTTI:BOOL=ON -DLLVM_ENABLE_PROJECTS:STRING="clang;lld" -DLLVM_ENABLE_BINDINGS:BOOL=OFF -DLLVM_INCLUDE_TESTS:BOOL=ON -DLLVM_TARGETS_TO_BUILD:STRING="${LLVM_TARGETS}" -DDEFAULT_SYSROOT:PATH="${DEFAULT_SYSROOT}" - ${MAKE} install + ${MAKE} + ${MAKE_INSTALL} cd "${CUR}" LLVM_VARS=-DLLVM_DIR:PATH="${CUR}/llvm_install/lib/cmake/llvm" From 81b55425d509ef46a94ab481b12076934365e258 Mon Sep 17 00:00:00 2001 From: Hugo Devillers Date: Fri, 28 Jun 2024 12:19:34 +0200 Subject: [PATCH 2/3] remove MAKE and MAKE_INSTALL from config.sh --- config-amdgpu.sh.template | 4 ---- config.sh.template | 4 ---- setup.sh | 3 +++ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/config-amdgpu.sh.template b/config-amdgpu.sh.template index be8e2df..35a96c9 100644 --- a/config-amdgpu.sh.template +++ b/config-amdgpu.sh.template @@ -2,13 +2,9 @@ : ${BUILD_TYPE:=Debug} : ${CMAKE_MAKE:=""} -: ${MAKE:="make -j4"} -: ${MAKE_INSTALL:="make install"} # use this for ninja instead of make #: ${CMAKE_MAKE:="-G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DLLVM_PARALLEL_COMPILE_JOBS=4 -DLLVM_PARALLEL_LINK_JOBS=1"} -#: ${MAKE:="ninja"} -#: ${MAKE_INSTALL:="ninja install"} # set this to true if you don't have a github account : ${HTTPS:=true} diff --git a/config.sh.template b/config.sh.template index 53d6cf5..ac1dd95 100644 --- a/config.sh.template +++ b/config.sh.template @@ -2,13 +2,9 @@ : ${BUILD_TYPE:=Debug} : ${CMAKE_MAKE:=""} -: ${MAKE:="make -j4"} -: ${MAKE_INSTALL:="make install"} # use this for ninja instead of make #: ${CMAKE_MAKE:="-G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DLLVM_PARALLEL_COMPILE_JOBS=4 -DLLVM_PARALLEL_LINK_JOBS=1"} -#: ${MAKE:="ninja"} -#: ${MAKE_INSTALL:="ninja install"} # set this to true if you don't have a github account : ${HTTPS:=true} diff --git a/setup.sh b/setup.sh index e5e7e95..8bb7aa3 100755 --- a/setup.sh +++ b/setup.sh @@ -40,6 +40,9 @@ source config.sh CUR=`pwd` +MAKE="cmake --build . --config ${BUILD_TYPE}" +MAKE_INSTALL="cmake --install . --config ${BUILD_TYPE}" + function remote { if $HTTPS; then echo "https://github.com/$1" From 0911d54c31433f6c027e133eab0c84564e193317 Mon Sep 17 00:00:00 2001 From: Gobrosse Date: Tue, 9 Jul 2024 13:20:49 +0200 Subject: [PATCH 3/3] 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 {