Skip to content

Commit ab6f90b

Browse files
committed
Build with clang-6.0 instead of clang-4.0
folly does not compile with versions of clang older than 6.0 these days. Also set CC and CXX in the environment so that folly and gmock get built with the intended compiler instead of being compiled with the default system compiler (gcc 4.8.4 on Ubuntu trusty). folly no longer compiles with gcc 4.8 either.
1 parent 868a9b7 commit ab6f90b

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

.travis.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,18 @@ addons:
3737

3838
matrix:
3939
include:
40-
# Set COMPILER environment variable instead of CC or CXX because the latter
41-
# are overriden by Travis. Setting the compiler in Travis doesn't work
42-
# either because it strips version.
43-
44-
- env: COMPILER=clang-4.0
40+
- env: COMPILER_EVAL="CC=clang-6.0 CXX=clang++-6.0"
4541
addons:
4642
apt:
4743
sources:
4844
- *common_srcs
49-
- llvm-toolchain-trusty-4.0
45+
- llvm-toolchain-trusty-6.0
5046
packages:
5147
- *common_deps
52-
- clang-4.0
48+
- clang-6.0
5349
- libstdc++-4.9-dev
5450

55-
- env: COMPILER=gcc-5
51+
- env: COMPILER_EVAL="CC=gcc-5 CXX=g++-5"
5652
addons:
5753
apt:
5854
sources:
@@ -61,7 +57,7 @@ matrix:
6157
- *common_deps
6258
- g++-5
6359

64-
- env: COMPILER=gcc-6
60+
- env: COMPILER_EVAL="CC=gcc-6 CXX=g++-6"
6561
addons:
6662
apt:
6763
sources:
@@ -93,11 +89,12 @@ before_script:
9389
# Install lcov to coveralls conversion + upload tool.
9490
- gem install coveralls-lcov
9591
- lcov --version
92+
- eval "$COMPILER_EVAL"
9693

9794
script:
9895
- mkdir build
9996
- cd build
100-
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DRSOCKET_CC=$COMPILER
97+
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE
10198
-DRSOCKET_ASAN=$ASAN -DRSOCKET_INSTALL_DEPS=True
10299
-DRSOCKET_BUILD_WITH_COVERAGE=ON ..
103100
- make -j4

CMakeLists.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
cmake_minimum_required(VERSION 3.2)
22

3-
# The RSOCKET_CC CMake variable specifies the C compiler, e.g. gcc-4.9.
4-
# The C++ compiler name is obtained by replacing "gcc" with "g++" and "clang"
5-
# with "clang++"". If RSOCKET_CC is not given, the compiler is detected
6-
# automatically.
7-
if (RSOCKET_CC)
8-
set(ENV{CC} ${RSOCKET_CC})
9-
if (${RSOCKET_CC} MATCHES clang)
10-
string(REPLACE clang clang++ CXX ${RSOCKET_CC})
11-
else ()
12-
string(REPLACE gcc g++ CXX ${RSOCKET_CC})
13-
endif ()
14-
set(ENV{CXX} ${CXX})
15-
endif ()
16-
173
project(ReactiveSocket)
184

195
# CMake modules.

0 commit comments

Comments
 (0)