Skip to content

Commit

Permalink
do_cmake: add a default value to BOOST_J
Browse files Browse the repository at this point in the history
Signed-off-by: luo rixin <luorixin@huawei.com>
  • Loading branch information
rosinL committed Dec 23, 2020
1 parent 37d0e85 commit 1621943
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions do_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ if type ccache > /dev/null 2>&1 ; then
ARGS+=" -DWITH_CCACHE=ON"
fi

if [[ ! "$ARGS $@" =~ "-DBOOST_J" ]] ; then
ncpu=$(getconf _NPROCESSORS_ONLN 2>&1)
[ -n "$ncpu" -a "$ncpu" -gt 1 ] && ARGS+=" -DBOOST_J=$(expr $ncpu / 2)"
fi

mkdir $BUILD_DIR
cd $BUILD_DIR
if type cmake3 > /dev/null 2>&1 ; then
Expand Down

0 comments on commit 1621943

Please sign in to comment.