diff options
| -rwxr-xr-x | travis/install.sh | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/travis/install.sh b/travis/install.sh index 950ed45f..3c1e92da 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -2,6 +2,17 @@ set -e +UNAME="$(uname)" || UNAME="" +if test "${UNAME}" = "Linux" ; then + NPROC=$(nproc); +elif test "${UNAME}" = "Darwin" ; then + NPROC=$(sysctl -n hw.ncpu); +fi +if test "x${NPROC}" = "x"; then + NPROC=2; +fi +echo "NPROC=${NPROC}" + # Download grid files wget http://download.osgeo.org/proj/proj-datumgrid-1.8.zip @@ -27,7 +38,7 @@ if [ -f /usr/lib/jvm/java-7-openjdk-amd64/include/jni.h ]; then else ../configure --prefix=/tmp/proj_autoconf_install_from_dist_all fi -make -j$(nproc) +make -j${NPROC} make check make install find /tmp/proj_autoconf_install_from_dist_all @@ -37,7 +48,7 @@ cd .. mkdir build_cmake cd build_cmake cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/proj_cmake_install -VERBOSE=1 make -j$(nproc) +VERBOSE=1 make -j${NPROC} make install # The cmake build is not able to generate the null file, so copy it at hand cp /tmp/proj_autoconf_install_from_dist_all/share/proj/null /tmp/proj_cmake_install/share/proj @@ -55,7 +66,7 @@ cd ../.. mkdir build_autoconf_grids cd build_autoconf_grids ../configure --prefix=/tmp/proj_autoconf_install_grids -make -j$(nproc) +make -j${NPROC} make check (cd src && make multistresstest && make test228) PROJ_LIB=../data src/multistresstest @@ -74,7 +85,7 @@ if [ "$BUILD_NAME" != "linux_clang" ]; then else ./configure fi -make -j$(nproc) +make -j${NPROC} make check # Rerun tests without grids not included in proj-datumgrid |
