-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
54 lines (46 loc) · 1.37 KB
/
CMakeLists.txt
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
54
cmake_minimum_required(VERSION 2.6)
project(ipush)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug")
endif()
set(CXX_FLAGS
-g
-DHAVE_NETINET_IN_H
-D__STDC_FORMAT_MACROS
-Wall
-Wextra
-Werror
-Wconversion
)
#set(CMAKE_CXX_COMPILER "g++")
set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -pg")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -finline-limit=1000 -DNDEBUG")
include_directories(
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/deps
${PROJECT_SOURCE_DIR}/deps/jsoncpp/include
${PROJECT_SOURCE_DIR}/deps/gtest
${PROJECT_SOURCE_DIR}/deps/gtest/include
${PROJECT_SOURCE_DIR}/deps/libevent
${PROJECT_SOURCE_DIR}/deps/libevent/include
${PROJECT_SOURCE_DIR}/deps/mongo-c-driver/src/mongoc
${PROJECT_SOURCE_DIR}/deps/mongo-c-driver/build/src/mongoc
${PROJECT_SOURCE_DIR}/deps/mongo-c-driver/src/libbson/src/bson
${PROJECT_SOURCE_DIR}/deps/mongo-c-driver/build/src/libbson/src/bson
/usr/local/include
)
link_directories(
${PROJECT_SOURCE_DIR}/deps/libevent/.libs
${PROJECT_SOURCE_DIR}/deps/cassandra/cpp-driver/build
${PROJECT_SOURCE_DIR}/deps/mongo-c-driver/build/.libs
${PROJECT_SOURCE_DIR}/deps/mongo-c-driver/build/src/libbson/.libs
/usr/local/lib
/usr/lib64/mysql
)
add_subdirectory(deps)
add_subdirectory(src)
add_subdirectory(test)
add_subdirectory(tools)
enable_testing()
add_test(NAME unittest.run COMMAND unittest.run)