Skip to content

Commit 9cfb32f

Browse files
committed
travis: first try of a Travis-CI config
most parts copied from cpp-netlib cmake/travis: don't run test suite for gtest/gmock by default heavily reduces build time (especially on travis) travis/cmake: disable LLVM's libc++
1 parent 508117c commit 9cfb32f

File tree

3 files changed

+34
-5
lines changed

3 files changed

+34
-5
lines changed

.travis.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
language:
2+
- cpp
3+
4+
compiler:
5+
- gcc
6+
- clang
7+
8+
env:
9+
- CMAKE_BUILD_TYPE="Release"
10+
- CMAKE_BUILD_TYPE="Debug"
11+
12+
before_install:
13+
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test --yes # libstdc++-4.8
14+
- if [ "${CXX}" == "clang++" ]; then sudo add-apt-repository --yes ppa:h-rayflood/llvm; fi # clang++-3.2
15+
- sudo apt-get update
16+
17+
install:
18+
- if [ "${CXX}" == "clang++" ]; then sudo apt-get -qq install clang-3.2; fi
19+
- sudo apt-get install g++-4.8; # clang need it for libstdc++ update
20+
21+
before_script:
22+
# update compilers
23+
- if [ "${CXX}" == "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
24+
- if [ "${CXX}" == "clang++" ]; then export CXX="clang++-3.2" CC="clang-3.2"; fi
25+
26+
script:
27+
- mkdir build
28+
- cd build
29+
- cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -Dpfasst_DISABLE_LIBCXX=ON -Dpfasst_BUILD_TESTS=ON ..
30+
- make
31+
- make test
32+

3rdparty/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,9 @@ if(pfasst_BUILD_TESTS)
1818
CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release
1919
-Dgtest_force_shared_crt=ON
2020
-DCMAKE_VERBOSE_MAKEFILE=ON
21-
-Dgmock_build_tests=ON
21+
-Dgmock_build_tests=${gtest_BUILD_TESTS}
2222
# Disable install step
2323
INSTALL_COMMAND ""
24-
# Run tests
25-
TEST_BEFORE_INSTALL ON
26-
TEST_AFTER_INSTALL ON
27-
TEST_COMMAND make test
2824
# Wrap download, configure and build steps in a script to log output
2925
LOG_DOWNLOAD ON
3026
LOG_CONFIGURE ON

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ include(ExternalProject)
1010
# Set default ExternalProject root directory
1111
set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/3rdparty)
1212

13+
option(pfasst_DISABLE_LIBCXX "Disable use of LLVM's libstdc++ when compiling with Clang." ON)
1314
option(pfasst_BUILD_TESTS "Build test suite for PFASST." ON)
1415

1516
# check for C++11 support

0 commit comments

Comments
 (0)