From 4c2cc0e36c01c13532e70dfc7ac0e1fc3cbe1336 Mon Sep 17 00:00:00 2001 From: Joakim Soderberg Date: Tue, 28 Jan 2014 11:53:48 +0100 Subject: [PATCH] Add CMake build to Travis config. --- .travis.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1cca274..452ed17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,14 @@ +env: + matrix: + - JANSSON_BUILD_METHOD=cmake JANSSON_CMAKE_OPTIONS="-DJANSSON_TEST_WITH_VALGRIND=ON" JANSSON_EXTRA_INSTALL="valgrind" + - JANSSON_BUILD_METHOD=autotools language: c compiler: - gcc - clang -script: autoreconf -f -i && CFLAGS=-Werror ./configure && make check +install: + - sudo apt-get update -qq + - sudo apt-get install -y -qq cmake $JANSSON_EXTRA_INSTALL +script: + - if [ "$JANSSON_BUILD_METHOD" = "autotools" ]; then autoreconf -f -i && CFLAGS=-Werror ./configure && make check; fi + - if [ "$JANSSON_BUILD_METHOD" = "cmake" ]; then mkdir build && cd build && cmake .. $JANSSON_CMAKE_OPTIONS && cmake --build . && ctest --output-on-failure; fi