-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathCMakeLists.txt
82 lines (59 loc) · 2.24 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
# -*- cmake -*-
cmake_minimum_required(VERSION 3.1)
project(rapid-bidder)
if(WIN32)
else(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb")
endif(WIN32)
set(CMAKE_CXX_STANDARD 14)
set(ENABLE_REDISCLIENT TRUE)
set(SUBMODULES_DIR "submodules")
IF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET ( CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/install)
SET ( CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OFF)
ENDIF()
message("CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}")
message("CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}")
message("CMAKE_CURRENT_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}")
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
IF (UNIX AND NOT APPLE)
SET(CMAKE_INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN/../lib64")
ELSE (UNIX AND NOT APPLE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib64")
ENDIF (UNIX AND NOT APPLE)
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/etc DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
set(REQUIRED_BOOST_LIBRARIES)
list(APPEND REQUIRED_BOOST_LIBRARIES "log" "program_options" "system" "serialization" "date_time")
set(Boost_USE_MULTITHREADED ON)
find_package(Boost
COMPONENTS "${REQUIRED_BOOST_LIBRARIES}"
REQUIRED
)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
endif()
add_definitions(-DBOOST_LOG_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK)
if (WIN32)
link_directories(${Boost_LIBRARY_DIRS})
endif(WIN32)
add_subdirectory(framework)
if(ENABLE_REDISCLIENT)
include(ExternalProject)
set(REDISCLIENT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/${SUBMODULES_DIR}/redisclient)
ExternalProject_Add(redisclient
SOURCE_DIR ${REDISCLIENT_SOURCE}
INSTALL_COMMAND ""
DOWNLOAD_COMMAND ""
)
endif()
add_subdirectory(exchange_server)
add_subdirectory(bidders)
add_subdirectory(loaders)