-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (25 loc) · 902 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
30
31
32
33
34
35
cmake_minimum_required(VERSION 3.22)
project(web_server_reboot)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Werror")
file(GLOB_RECURSE SOURCES "src/*.cpp" "src/*.h")
add_executable(web_server_reboot main.cpp ${SOURCES})
find_package(OpenSSL REQUIRED)
find_package(spdlog REQUIRED)
target_link_libraries(web_server_reboot OpenSSL::SSL spdlog::spdlog)
find_package(GTest QUIET)
if (GTest_FOUND)
enable_testing()
file(GLOB_RECURSE SOURCES "test/*_test.cpp" "src/*.cpp" "src/*.h")
add_executable(web_server_reboot_test ${SOURCES})
target_link_libraries(
web_server_reboot_test
GTest::gtest_main
OpenSSL::SSL
spdlog::spdlog
)
include(GoogleTest)
gtest_discover_tests(web_server_reboot_test)
else ()
message(WARNING "GTest not found. Tests will not be built.")
endif ()