belle
/
example
/
client
/
https
/
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
cmake_minimum_required (VERSION 3.8 FATAL_ERROR)
set (TARGET "app")
project (${TARGET})
find_program (CCACHE_FOUND ccache)
if (CCACHE_FOUND)
message ("ccache found")
set_property (GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_CXX_FLAGS "-fdiagnostics-color=auto -DOB_BELLE_CONFIG_SERVER_OFF")
set (CMAKE_C_FLAGS "-fdiagnostics-color=auto -DOB_BELLE_CONFIG_SERVER_OFF")
set (DEBUG_FLAGS "-Wpedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused -std=c++17 -g")
set (DEBUG_LINK_FLAGS "-fprofile-arcs -ftest-coverage -flto")
set (RELEASE_FLAGS "-std=c++17 -s -O3")
set (RELEASE_LINK_FLAGS "-flto")
set (CMAKE_CXX_FLAGS_DEBUG ${DEBUG_FLAGS})
set (CMAKE_C_FLAGS_DEBUG ${DEBUG_FLAGS})
set (CMAKE_EXE_LINKER_FLAGS_DEBUG ${DEBUG_LINK_FLAGS})
set (CMAKE_CXX_FLAGS_RELEASE ${RELEASE_FLAGS})
set (CMAKE_C_FLAGS_RELEASE ${RELEASE_FLAGS})
set (CMAKE_EXE_LINKER_FLAGS_RELEASE ${RELEASE_LINK_FLAGS})
message ("CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}")
include_directories(
./
./src
../../../include
)
set (SOURCES
src/main.cc
)
set (HEADERS
)
add_executable (
${TARGET}
${SOURCES}
${HEADERS}
)
target_link_libraries (
${TARGET}
ssl
crypto
pthread
boost_system
)