-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (35 loc) · 1.34 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
cmake_minimum_required(VERSION 3.2)
project(cpp-rest-test)
set ( CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /opt/local )
set(Boost_USE_MULTI_THREADED ON)
find_package( Boost 1.57.0
REQUIRED unit_test_framework system regex date_time thread filesystem
program_options chrono atomic )
find_package( OpenSSL )
find_package( Threads )
find_package ( cppnetlib 0.11.0 REQUIRED )
set(CMAKE_VERBOSE_MAKEFILE true)
if (CMAKE_BUILD_TYPE MATCHES Debug)
add_definitions(-DBOOST_NETWORK_DEBUG)
endif()
if (OPENSSL_FOUND)
add_definitions(-DBOOST_NETWORK_ENABLE_HTTPS)
include_directories(${OPENSSL_INCLUDE_DIR})
endif()
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# We want to link in C++11 mode if we're using Clang and on OS X.
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -ftemplate-depth=256 -std=c++11 -stdlib=libc++")
else()
# We just add the -Wall and a high enough template depth
# flag for Clang in other systems.
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -ftemplate-depth=256")
endif()
endif()
include_directories( /opt/local/include )
include(Testing.cmake)
enable_testing()
add_subdirectory(server)
#don't forget to run cmake from the build directory! It's easier that way.