-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
41 lines (31 loc) · 937 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
36
37
38
39
40
41
cmake_minimum_required (VERSION 3.25)
option(BUILD_TESTS "Build test programs" ON)
option(ENABLE_TEST_COVERAGE "Enable coverage reporting" OFF)
option(BUILD_DOC "Build documentation" OFF)
if (BUILD_TESTS)
list(APPEND VCPKG_MANIFEST_FEATURES "tests")
endif ()
project("File transfer over UDP"
LANGUAGES C CXX
VERSION 1.0)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_C_STANDARD 23)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Test
if (BUILD_TESTS)
enable_testing()
endif ()
add_library(coverage_config INTERFACE)
if (ENABLE_TEST_COVERAGE)
target_compile_options(coverage_config INTERFACE -O0 -g --coverage)
target_link_options(coverage_config INTERFACE --coverage)
endif ()
# Subproject
add_subdirectory("examples")
add_subdirectory("logger")
add_subdirectory("tftp")