-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
43 lines (33 loc) · 1.04 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
cmake_minimum_required(VERSION 3.30.5)
project(webServer)
add_executable(${PROJECT_NAME})
set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME})
set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD 26
CXX_STANDARD_REQUIRED ON
COMPILE_WARNING_AS_ERROR ON
RUNTIME_OUTPUT_DIRECTORY ${BINARY_DIR}
INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE
)
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS src/*.cpp)
target_sources(${PROJECT_NAME} PRIVATE
${SOURCES}
)
target_compile_options(${PROJECT_NAME} PRIVATE
-Wall -Wextra -Wpedantic
$<$<CONFIG:Debug>:-Og -fsanitize=address>
$<$<CONFIG:Release>:-Ofast -march=native>
)
target_link_options(${PROJECT_NAME} PRIVATE
$<$<CONFIG:Debug>:-fsanitize=address>
)
target_link_libraries(${PROJECT_NAME} PRIVATE
uring
brotlienc
mariadb
)
add_custom_command(TARGET ${PROJECT_NAME}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/resources
${BINARY_DIR}/resources
VERBATIM
)