diff options
author | Christian Fetzer <fetzer.ch@gmail.com> | 2016-02-13 12:40:21 +0100 |
---|---|---|
committer | Christian Fetzer <fetzer.ch@gmail.com> | 2016-02-14 01:27:15 +0100 |
commit | 3de370833eadabfb52fb53aac07ef94fb3e4b74b (patch) | |
tree | 81091219cd5ae00d05714bc360df6fbd14b98faa /.travis.yml | |
parent | 4ffe783c80e5d5c400af0e40eff30b5cc9cf0d12 (diff) |
[travis] Build with CMake
Add TOOLS variable to switch between Autotools and CMake based build.
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml index e1ee30f3ef..3c2da75d00 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,8 @@ compiler: - clang env: - - BUILD=Kodi + - BUILD=Kodi TOOLS=Autotools + - BUILD=Kodi TOOLS=CMake - ADDONS=adsp - ADDONS=audiodecoder - ADDONS=audioencoder @@ -55,6 +56,7 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD" == "Kodi" ]]; then sudo add-apt-repository -y ppa:team-xbmc/xbmc-ppa-build-depends && sudo add-apt-repository -y ppa:wsnipex/vaapi && + sudo add-apt-repository -y ppa:george-edison55/cmake-3.x && sudo apt-get update -qq; fi @@ -84,14 +86,27 @@ before_script: # Linux # - if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD" == "Kodi" ]]; then - cd $TRAVIS_BUILD_DIR/ && - ./bootstrap; + if [[ "$TOOLS" == "Autotools" ]]; then + cd $TRAVIS_BUILD_DIR && + ./bootstrap; + elif [[ "$TOOLS" == "CMake" ]]; then + mkdir $TRAVIS_BUILD_DIR/build && + cd $TRAVIS_BUILD_DIR/build; + fi fi - if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD" == "Kodi" && "$CXX" == "g++" ]]; then - ./configure; + if [[ "$TOOLS" == "Autotools" ]]; then + ./configure; + elif [[ "$TOOLS" == "CMake" ]]; then + cmake ../project/cmake; + fi fi - if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD" == "Kodi" && "$CXX" == "clang++" ]]; then - CXXFLAGS="-Qunused-arguments" ./configure; + if [[ "$TOOLS" == "Autotools" ]]; then + CXXFLAGS="-Qunused-arguments" ./configure; + elif [[ "$TOOLS" == "CMake" ]]; then + cmake -DCMAKE_CXX_FLAGS="-Qunused-arguments" ../project/cmake; + fi fi - if [[ "$BUILD" != "Kodi" ]] && [[ "$ADDONS" == "adsp" || "$ADDONS" == "audiodecoder" || "$ADDONS" == "audioencoder" || "$ADDONS" == "pvr" || "$ADDONS" == "screensaver" || "$ADDONS" == "visualization" ]]; then @@ -106,9 +121,14 @@ before_script: # script: - if [[ "$BUILD" == "Kodi" ]]; then - make -j3 && - make testsuite && - ./kodi-test; + if [[ "$TOOLS" == "Autotools" ]]; then + make -j3 && + make testsuite && + ./kodi-test; + elif [[ "$TOOLS" == "CMake" ]]; then + make -j3 && + make check; + fi fi - if [[ "$BUILD" != "Kodi" ]] && [[ "$ADDONS" == "adsp" || "$ADDONS" == "audiodecoder" || "$ADDONS" == "audioencoder" || "$ADDONS" == "pvr" || "$ADDONS" == "screensaver" || "$ADDONS" == "visualization" ]]; then |