Skip to content

Commit 3bfeedd

Browse files
committed
add safety for old config files without BUILD_JOBS
1 parent 81b5542 commit 3bfeedd

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

config-amdgpu.sh.template

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# use Debug or Release
22
: ${BUILD_TYPE:=Debug}
3+
: ${BUILD_JOBS:="8"}
34

45
: ${CMAKE_MAKE:=""}
56

config.sh.template

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# use Debug or Release
22
: ${BUILD_TYPE:=Debug}
3+
: ${BUILD_JOBS:="8"}
34

45
: ${CMAKE_MAKE:=""}
56

setup.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ source config.sh
4040

4141
CUR=`pwd`
4242

43-
MAKE="cmake --build . --config ${BUILD_TYPE}"
43+
if [ ! -v BUILD_JOBS ]; then
44+
echo "Please specify BUILD_JOBS in the config.sh file"
45+
exit -1
46+
fi
47+
48+
MAKE="cmake --build . --config ${BUILD_TYPE} -j ${BUILD_JOBS}"
4449
MAKE_INSTALL="cmake --install . --config ${BUILD_TYPE}"
4550

4651
function remote {

0 commit comments

Comments
 (0)