-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
58 lines (52 loc) · 1.46 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
cmake_minimum_required(VERSION 3.27)
project(tasknow C CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(FETCHCONTENT_QUIET OFF)
find_package(Boost 1.81 COMPONENTS program_options REQUIRED)
add_library(libtasknow OBJECT
src/buffer.h
src/defines.h
src/errors.h
src/task.h
src/task.cpp
src/task_list.h
src/task_list.cpp
src/request_handler.h
src/request_handler.cpp
)
target_include_directories(libtasknow PUBLIC src)
add_executable(tasknowd
src/main.cpp
src/serverd.h
src/serverd.cpp
)
target_link_libraries(tasknowd PRIVATE libtasknow)
add_subdirectory(src/tasknow-cli)
add_subdirectory(tests)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options(libtasknow PUBLIC
"-Weverything"
"-Wno-c++98-compat"
"-Wno-c++98-compat-pedantic"
"-Wno-c++11-compat"
"-Wno-c++11-compat-pedantic"
"-Wno-c++14-compat"
"-Wno-c++14-compat-pedantic"
"-Wno-c++17-compat"
"-Wno-c++17-compat-pedantic"
"-Wno-c++20-compat"
"-Wno-c++20-compat-pedantic"
"-Wno-padded"
"-Wno-unsafe-buffer-usage" # https://github.com/llvm/llvm-project/issues/64646#issuecomment-1747952699
)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(libtasknow PUBLIC
"-Wall"
"-Wextra"
"-Wpedantic"
"-Wconversion"
)
endif()