-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
29 lines (21 loc) · 903 Bytes
/
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
cmake_minimum_required(VERSION 3.29)
project(TinyLittleHTTP C)
set(CMAKE_C_STANDARD 23)
add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
endif()
include(CTest)
enable_testing()
add_subdirectory(./tiny_libs/TinyLittleURLUtils)
add_library(tiny_http_server_lib STATIC src/tiny_http/tiny_http_server_lib.c src/tiny_http/tiny_http_server_lib.h)
target_include_directories(tiny_http_server_lib PUBLIC src/tiny_http)
target_link_libraries(tiny_http_server_lib PRIVATE tiny_url_encoder_lib)
add_executable(assert_tiny_http_server_lib test/assert_tiny_http_server_lib.c)
target_link_libraries(assert_tiny_http_server_lib
PRIVATE tiny_http_server_lib
PRIVATE tiny_url_decoder_lib)
add_test(test_tiny_http_server_lib assert_tiny_http_server_lib)