Skip to content

Commit

Permalink
add safety for old config files without BUILD_JOBS
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugobros3 committed Jul 9, 2024
1 parent 81b5542 commit 3bfeedd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions config-amdgpu.sh.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# use Debug or Release
: ${BUILD_TYPE:=Debug}
: ${BUILD_JOBS:="8"}

: ${CMAKE_MAKE:=""}

Expand Down
1 change: 1 addition & 0 deletions config.sh.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# use Debug or Release
: ${BUILD_TYPE:=Debug}
: ${BUILD_JOBS:="8"}

: ${CMAKE_MAKE:=""}

Expand Down
7 changes: 6 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3bfeedd

Please sign in to comment.