forked from chenshuo/muduo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clang.diff
33 lines (31 loc) · 859 Bytes
/
clang.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fcb8103..06fa58f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
-Wpointer-arith
@@ -27,16 +29,15 @@ set(CXX_FLAGS
-march=native
# -MMD
# -std=c++0x
- -rdynamic
)
if(CMAKE_BUILD_BITS EQUAL 32)
list(APPEND CXX_FLAGS "-m32")
endif()
string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}")
-set(CMAKE_CXX_COMPILER "g++")
+set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_CXX_FLAGS_DEBUG "-O0")
-set(CMAKE_CXX_FLAGS_RELEASE "-O2 -finline-limit=1000 -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)