-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
90 lines (76 loc) · 2.08 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
cmake_minimum_required(VERSION 3.0)
project(cxxdoor CXX)
set(CMAKE_CXX_COMPILER clang++)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE Debug)
include_directories(SYSTEM /usr/local/include /usr/include)
link_directories(SYSTEM /usr/local/lib /usr/lib)
find_library(ROCKSDB rocksdb)
set(BOOST_USE_STATIC_LIBS ON)
set(BOOST_USE_MULTITHREADED ON)
set(BOOST_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.60 COMPONENTS date_time filesystem system atomic thread serialization)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
find_library(FOLLY folly)
find_library(WANGLE wangle)
find_library(PTHREAD pthread)
find_library(GLOG glog)
find_library(Z z)
find_library(GFLAGS gflags)
find_library(SSL ssl)
find_library(CRYPTO crypto)
find_library(PROXYGENLIB proxygenlib)
find_library(PROXYGENHTTPSERVER proxygenhttpserver)
find_library(DCONV double-conversion)
find_library(GTEST gtest)
find_library(GTEST_MAIN gtest_main)
find_library(DL dl)
find_library(DEMANGLE demangle)
set(SRC
usuario.cpp
rocksentity.cpp
dbmanager.cpp
booking.cpp
usuariocontroller.cpp
BookingController.cpp
UsuarioHandler.cpp
CommandProcessor.cpp
HandlerFactory.cpp
AuthenticationProcessor.cpp
AddUserProcessor.cpp
authenticationfilter.cpp
LoggingFilter.cpp)
set(TEST_SRC ${SRC}
usuariotest.cpp
bookingstest.cpp)
set(MAIN main.cpp)
# add_library(LIBCXXDOOR SHARED ${SRC})
# d_library(LIBCXXDOOR_TEST SHARED ${TEST_SRC})
set(LIBS
${DL}
${Boost_LIBRARIES}
${ROCKSDB}
${Z}
${PTHREAD}
${CRYPTO}
${SSL}
${DCONV}
${GLOG}
${GFLAGS}
${FOLLY}
${WANGLE}
${PROXYGENLIB}
${PROXYGENHTTPSERVER}
)
set(LIBS_TEST
${LIBS}
${GTEST}
${GTEST_MAIN}
)
add_executable(${PROJECT_NAME} ${MAIN} ${SRC})
target_link_libraries(${PROJECT_NAME} ${LIBS})
add_executable(main_test main_test.cpp ${TEST_SRC})
target_link_libraries(main_test ${LIBS_TEST})
enable_testing()
add_test(NAME main_test
COMMAND main_test)