-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
29 lines (23 loc) · 930 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
# - Support for C_STANDARD 17 was added in version 3.21
# - Support for saving subgroup matches on regexp string related operations started from 3.9
cmake_minimum_required(VERSION 3.21)
project(doryta)
set(CMAKE_C_STANDARD 17)
option(CMAKE_C_STANDARD_REQUIRED ON)
add_subdirectory(external)
# Setting optimizations (ignoring external as there is nothing we
# can do for them. Their badly written, but our library shouldn't)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mtune=native \
-Wall -Wextra -Wpedantic \
-Wformat=2 -Wno-unused-parameter -Wshadow \
-Wwrite-strings -Wold-style-definition \
-Wnested-externs -Wmissing-include-dirs \
-Werror")
#-Wstrict-prototypes -Wredundant-decls
add_subdirectory(src)
set(DORYTA_MODELS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/data/models")
string(COMPARE NOTEQUAL "RELEASE" "${CMAKE_BUILD_TYPE}" not_release)
if(BUILD_TESTING AND not_release)
include(CTest)
add_subdirectory(test)
endif()