Skip to content

Commit 63bcd5d

Browse files
authored
Merge pull request #233 from ehein6/travis-compiler-upgrade
Upgrade to ubuntu 14.04, clang 3.8, and gcc-5 in Travis CI build
2 parents c479429 + 3054e30 commit 63bcd5d

2 files changed

Lines changed: 39 additions & 9 deletions

File tree

.travis.yml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,43 @@
1+
dist: trusty
12
sudo: false
23
language: cpp
3-
compiler:
4-
- gcc
5-
- clang
6-
before_install:
7-
- wget --no-check-certificate http://www.cmake.org/files/v3.3/cmake-3.3.0-rc3-Linux-x86_64.sh
8-
- mkdir -p $HOME/cmake
9-
- sh cmake-3.3.0-rc3-Linux-x86_64.sh --skip-license --prefix=$HOME/cmake
104
before_script:
115
- mkdir build
126
- cd build
13-
- $HOME/cmake/bin/cmake ..
7+
- cmake ..
148
script:
159
- make
16-
- make check
10+
- OMP_NUM_THREADS=2 STINGER_MAX_MEMSIZE=64M CTEST_OUTPUT_ON_FAILURE=1 make test
11+
addons:
12+
apt:
13+
sources:
14+
# Provides newer compilers
15+
- ubuntu-toolchain-r-test
16+
# Provides newer cmake
17+
- george-edison55-precise-backports
18+
# Provides OpenMP support for clang, currently broken
19+
# - debian-sid
20+
packages:
21+
- gcc-5
22+
- g++-5
23+
- cmake
24+
- cmake-data
25+
- clang-3.8
26+
- libprotobuf-dev
27+
- protobuf-compiler
28+
# Provides OpenMP support for clang, currently broken
29+
# - libomp-dev
30+
31+
# The 'compiler' key overwrites CC and CXX even if they are set in 'env'
32+
# This step runs after both of them
33+
before_install:
34+
- eval "${MATRIX_EVAL}"
35+
36+
matrix:
37+
include:
38+
- os: linux
39+
compiler: clang
40+
env: MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
41+
- os: linux
42+
compiler: gcc
43+
env: MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ if(OPENMP_FOUND)
2626
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
2727
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
2828
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
29+
else()
30+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -lpthread")
31+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lpthread")
2932
endif()
3033

3134
link_libraries(m)

0 commit comments

Comments
 (0)