forked from chenshuo/muduo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
clang.diff
37 lines (35 loc) · 926 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
34
35
36
37
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fcb8103..c1f3967 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,25 +18,29 @@ set(CXX_FLAGS
-Wextra
-Werror
-Wconversion
+ -Wno-null-dereference
+ -Wno-sign-conversion
+ -Wno-unused-local-typedef
-Wno-unused-parameter
+ -Wno-unused-private-field
-Wold-style-cast
-Woverloaded-virtual
-Wpointer-arith
-Wshadow
+ -Wthread-safety
-Wwrite-strings
-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)