Skip to content

Commit

Permalink
try clang on travis
Browse files Browse the repository at this point in the history
Cherry-pick: a5327ba
  • Loading branch information
chenshuo committed Jan 20, 2017
1 parent 32e92fd commit de207d6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@ sudo: required
dist: trusty
compiler:
- gcc
- clang
os:
- linux
install:
- sudo apt-get install libboost-dev
- sudo apt-get install libprotobuf-dev protobuf-compiler libprotoc-dev
- sudo apt-get install libboost-test-dev libboost-program-options-dev
- sudo apt-get install zlib1g-dev libc-ares-dev libcurl4-openssl-dev
- sudo apt-get install libc-ares-dev libcurl4-openssl-dev
- sudo apt-get install zlib1g-dev libgd-dev
env:
- BUILD_TYPE=debug
- BUILD_TYPE=release
script:
- if [ "$CXX" == "clang++" ]; then patch -p1 < clang.diff; fi
- ./build.sh
10 changes: 6 additions & 4 deletions clang.diff
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a3066c5..9728303 100644
index 81bd126..38c7387 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,7 @@
@@ -18,7 +18,9 @@ set(CXX_FLAGS
-Wextra
-Werror
-Wconversion
+ -Wno-sign-conversion
-Wno-unused-parameter
+ -Wno-unused-private-field
-Wold-style-cast
-Woverloaded-virtual
@@ -25,16 +26,15 @@
-Wpointer-arith
@@ -27,16 +29,15 @@ set(CXX_FLAGS
-march=native
# -MMD
# -std=c++0x
-std=c++0x
- -rdynamic
)
if(CMAKE_BUILD_BITS EQUAL 32)
Expand Down

0 comments on commit de207d6

Please sign in to comment.