forked from chenshuo/muduo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clang.diff
53 lines (48 loc) · 1.39 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2c8880a..ea1432a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,13 +9,14 @@ endif()
set(CXX_FLAGS
-g
# -DVALGRIND
- # -DMUDUO_STD_STRING
+ -DMUDUO_STD_STRING
-D_FILE_OFFSET_BITS=64
-Wall
-Wextra
- -Werror
+ # -Werror
-Wconversion
-Wno-unused-parameter
+ -Wno-sign-conversion
-Wold-style-cast
-Woverloaded-virtual
-Wpointer-arith
@@ -24,17 +25,19 @@ set(CXX_FLAGS
-march=native
# -MMD
# -std=c++0x
- -rdynamic
+ # -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 "g++")
#set(CMAKE_CXX_COMPILER "icpc")
+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(CMAKE_EXE_LINKER_FLAGS -lstdc++)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
@@ -48,6 +51,8 @@ find_library(MHD_LIBRARY NAMES microhttpd)
find_library(BOOSTTEST_LIBRARY NAMES boost_unit_test_framework)
include_directories(${Boost_INCLUDE_DIRS})
+include_directories(/usr/lib/gcc/x86_64-linux-gnu/4.4/include/)
+include_directories(/usr/lib/gcc/x86_64-linux-gnu/4.4/include-fixed/)
include_directories(${PROJECT_SOURCE_DIR})