-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
30 lines (23 loc) · 822 Bytes
/
CMakeLists.txt
File metadata and controls
30 lines (23 loc) · 822 Bytes
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
cmake_minimum_required(VERSION 3.20)
project(web_app LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_library(web_app INTERFACE)
add_library(web_app::web_app ALIAS web_app)
target_include_directories(web_app INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
if (MSVC)
target_compile_options(web_app INTERFACE /W4 /permissive-)
else()
target_compile_options(web_app INTERFACE -Wall -Wextra -Wpedantic)
endif()
# --- Vix deps (hashing) ---
include(.vix/vix_deps.cmake)
target_link_libraries(web_app INTERFACE vix::app)
include(CTest)
enable_testing()
add_executable(web_app_basic_test tests/test_basic.cpp)
target_link_libraries(web_app_basic_test PRIVATE web_app::web_app)
add_test(NAME web_app.basic COMMAND web_app_basic_test)