hyperion.ng/.travis/travis_build.sh
Rick van Hattem 61db9f43b8 Qcommandlineparser (#199)
* Replaced getoptplusplus with QCommandLineParser. Fixes #39

* enabling C++11 if possible

* enabling C++11 if possible

* fixed gcc compilation issues

* fixed linux builds and improved os x build

* trying to fix dispmanx

* trying to fix dispmanx

* simplified travis build script

* fixed argumentparser default values

* rewrote validator system and made sure default arguments are processed correctly

* rewrote validator system and made sure default arguments are processed correctly

* fixed bool vs. regular options

* oops... removing debug code

* reverted screenshot api change
2016-08-28 15:10:43 +02:00

33 lines
687 B
Bash
Executable File

#!/bin/bash
# for executing in non travis environment
[ -z "$TRAVIS_OS_NAME" ] && TRAVIS_OS_NAME="$(uname -s | tr 'A-Z' 'a-z')"
# Detect number of processor cores
if [[ $TRAVIS_OS_NAME == 'osx' || $TRAVIS_OS_NAME == 'darwin' ]]; then
procs=$(sysctl -n hw.ncpu | xargs)
elif [[ $TRAVIS_OS_NAME == 'linux' ]]; then
procs=$(nproc)
else
# For most modern systems, including the pi, this is a sane default
procs=4
fi
# Compile hyperion
mkdir build || exit 1
cd build
cmake -DPLATFORM=x86-dev -DCMAKE_BUILD_TYPE=Debug .. || exit 2
make -j$(nproc) || exit 3
# Build the package on Linux
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
make -j$(nproc) package || exit 4
fi