diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2020-07-05 21:00:47 +0200 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2020-07-05 21:07:15 +0200 |
commit | 876071f9b3d293ce6635d7a3998efb67d0c2b653 (patch) | |
tree | e3107129f9ae670d2724049cb855dc173c6f2b3e /ci/build | |
parent | a1acedaefb131a0786cb1d00cd5861604d0de491 (diff) | |
download | ccache-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-x | ci/build | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -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 |