summaryrefslogtreecommitdiff
path: root/ci/build
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2020-07-05 21:00:47 +0200
committerJoel Rosdahl <joel@rosdahl.net>2020-07-05 21:07:15 +0200
commit876071f9b3d293ce6635d7a3998efb67d0c2b653 (patch)
treee3107129f9ae670d2724049cb855dc173c6f2b3e /ci/build
parenta1acedaefb131a0786cb1d00cd5861604d0de491 (diff)
downloadccache-876071f9b3d293ce6635d7a3998efb67d0c2b653.tar.gz
Tweak ci/build script
- Removed redundant “exit 0” command again. - Removed now obsolete and misleading comments. - If JOBS is set to the empty string then detect the number of CPUs instead of running a limitless number of jobs.
Diffstat (limited to 'ci/build')
-rwxr-xr-xci/build11
1 files changed, 4 insertions, 7 deletions
diff --git a/ci/build b/ci/build
index b326e9a6..4baeded4 100755
--- a/ci/build
+++ b/ci/build
@@ -11,15 +11,12 @@ fi
if [ -n "${SPECIAL:-}" ]; then
exec "ci/$SPECIAL"
else
- [ -z ${JOBS+x} ] && JOBS=$(getconf _NPROCESSORS_ONLN 2>/dev/null)
- [ -z ${JOBS+x} ] && JOBS=2
+ [ -z ${JOBS:+x} ] && JOBS=$(getconf _NPROCESSORS_ONLN 2>/dev/null)
+ [ -z ${JOBS:+x} ] && JOBS=2
mkdir -p ${BUILDDIR:-build}
cd ${BUILDDIR:-build}
${CMAKE_PREFIX:-} cmake ${CMAKE_PARAMS:-} ${CCACHE_LOC:-..}
- # 4 jobs seem to be a reasonable default for Travis.
- ${CMAKE_PREFIX:-} cmake --build . ${BUILDEXTRAFLAGS:-} -- -j${JOBS}
- # Warning: Rare random failures when running with -j4.
- [ "${RUN_TESTS:-1}" -ne "1" ] || ctest --output-on-failure -j${JOBS} "$@"
+ ${CMAKE_PREFIX:-} cmake --build . ${BUILDEXTRAFLAGS:-} -- -j$JOBS
+ [ "${RUN_TESTS:-1}" -ne "1" ] || ctest --output-on-failure -j$JOBS "$@"
fi
-exit 0