diff options
author | Herbert Thielen <thielen@hs-worms.de> | 2017-09-04 16:19:06 (GMT) |
---|---|---|
committer | Herbert Thielen <thielen@hs-worms.de> | 2017-09-04 16:19:06 (GMT) |
commit | d96a038e8b2bce971192669f3ea3965612678633 (patch) | |
tree | b258d2797971a95361cb89cdfea142d29cd31231 /travis.sh | |
parent | 7c6353d29a147cad1c904bf2957fd4ca2befe135 (diff) | |
download | googletest-d96a038e8b2bce971192669f3ea3965612678633.zip googletest-d96a038e8b2bce971192669f3ea3965612678633.tar.gz googletest-d96a038e8b2bce971192669f3ea3965612678633.tar.bz2 |
set MAKEFLAGS to use multiple processors on Travis CI
Diffstat (limited to 'travis.sh')
-rwxr-xr-x | travis.sh | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1,5 +1,16 @@ #!/usr/bin/env sh set -evx + +# if possible, ask for the precise number of processors, +# otherwise take 2 processors as reasonable default; see +# https://docs.travis-ci.com/user/speeding-up-the-build/#Makefile-optimization +if [ -x /usr/bin/getconf ]; then + MAKEFLAGS=j$(/usr/bin/getconf _NPROCESSORS_ONLN) +else + MAKEFLAGS="j2" +fi +export MAKEFLAGS + env | sort mkdir build || true |