-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (44 loc) · 1.56 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 3.10)
project(tcp-compression-service VERSION 0.0)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_BUILD_TYPE DEBUG)
set(CMAKE_COMPILE_WARNING_MODE HIGH)
set(CMAKE_COMPILE_WARNING_AS_ERROR TRUE)
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
set(CMAKE_CXX_CLANG_TIDY
clang-tidy;
-header-filter=.;
"-checks=cppcoreguidelines-*,\
google-*,\
misc-*,\
clang-*,\
-cppcoreguidelines-pro-bounds-pointer-arithmetic,\
-cppcoreguidelines-pro-bounds-constant-array-index,\
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,\
-cppcoreguidelines-pro-type-member-init,\
-cppcoreguidelines-special-member-functions,\
-cppcoreguidelines-pro-type-reinterpret-cast,\
-cppcoreguidelines-pro-type-vararg"
)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
configure_file(project-config.h.in project-config.h)
add_executable(tcp-compression-service
src/main.cpp
src/service.cpp
src/listener.cpp
src/worker.cpp
src/compression.cpp
)
target_include_directories(tcp-compression-service PRIVATE
"${PROJECT_SOURCE_DIR}/include"
)
target_link_libraries(tcp-compression-service Threads::Threads)
OPTION(VERBOSE "Enables printing to standard out" OFF)
if (VERBOSE)
target_compile_definitions(tcp-compression-service PRIVATE
VERBOSE
)
endif()