-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
43 lines (33 loc) · 951 Bytes
/
CMakeLists.txt
File metadata and controls
43 lines (33 loc) · 951 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
31
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.31)
set(NAME tn)
project(${NAME} C)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
if (CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(
-Wall
-Wextra
-Wpedantic
-Werror
-Wshadow
-Wconversion
-Wformat=2
-Wnull-dereference
-Wstrict-prototypes
-Wmissing-prototypes
-Wcast-align
-Wundef
)
endif ()
enable_testing()
include_directories(${CMAKE_SOURCE_DIR}/lib/unity)
# Добавляем все модули
add_subdirectory(src/clip)
add_subdirectory(src/common)
add_subdirectory(src/fs)
add_subdirectory(src/executer)
# Главный исполняемый файл
add_executable(tn src/main.c)
# Линкуем его с нужными модулями
target_link_libraries(tn clip common fs executer)