#!/bin/bash
if [[ "$TRAVIS" != "true" ]] ; then
	echo "Running this script makes no sense outside of travis-ci.org"
	exit 1
fi

# Functions
tmstamp() { echo -n "[$(date '+%H:%M:%S')]" ; }

# Environment
NUMTHREADS=4
if [[ -f /sys/devices/system/cpu/online ]]; then
	# Calculates 1.5 times physical threads
	NUMTHREADS=$(( ( $(cut -f 2 -d '-' /sys/devices/system/cpu/online) + 1 ) * 15 / 10  ))
fi
#NUMTHREADS=1 # disable MP
export NUMTHREADS

# For clang, use embedded boost and ninja as our 'funky' setup
# pdal_test segfaults when built against external g++-built boost,
# and I haven't found a good boost package built with clang yet
if [[ "$CXX" == "clang++" ]]
then
    export PDAL_CMAKE_GENERATOR="Ninja"
    export PDAL_EMBED_BOOST="ON"
else
    export PDAL_CMAKE_GENERATOR="Unix Makefiles"
    export PDAL_EMBED_BOOST="OFF"
fi

#!/bin/bash
if [[ "$TRAVIS" != "true" ]] ; then
	echo "Running this script makes no sense outside of travis-ci.org"
	exit 1
fi

# Functions
tmstamp() { echo -n "[$(date '+%H:%M:%S')]" ; }

# Environment
NUMTHREADS=4
if [[ -f /sys/devices/system/cpu/online ]]; then
	# Calculates 1.5 times physical threads
	NUMTHREADS=$(( ( $(cut -f 2 -d '-' /sys/devices/system/cpu/online) + 1 ) * 15 / 10  ))
fi
#NUMTHREADS=1 # disable MP
export NUMTHREADS

# pdal_test segfaults when built against external g++-built boost,
# and I haven't found a good boost package built with clang yet
if [[ "$CXX" == "clang++" ]]
then
    # We tried Ninja in 0a72021fee914e28df0ce2dc9fb3291d62b5183d,
    # but our tests were taking too long so we went back to Unix Makefiles.
    # If we find/make a cmake 2.8.12  (or close) package from
    # a PPA we could re-enable Ninja
    export PDAL_CMAKE_GENERATOR="Unix Makefiles"
    export PDAL_EMBED_BOOST="ON"
else
    export PDAL_CMAKE_GENERATOR="Unix Makefiles"
    export PDAL_EMBED_BOOST="OFF"
fi

Disable Ninja builds for clang
Disable Ninja builds for clang

The cmake build was taking too long, so Travis was killing it. If we
find a packaged cmake 2.8.12 we could re-enable Ninja.
