-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
43 lines (36 loc) · 1.33 KB
/
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
42
43
##########################################################################
# Project Setup #
##########################################################################
cmake_minimum_required(VERSION 3.11)
project(LongFiCore
# Remember to update `src/text_version.c` when bumping the version,
# otherwise tests/CI will fail.
VERSION 0.3.0
LANGUAGES C
)
set(CMAKE_C_STANDARD 99)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(CTest)
##########################################################################
# Static Analysis #
##########################################################################
find_program(CPPCHECK NAMES cppcheck)
if(CPPCHECK)
message(STATUS "Found cppcheck: ${CPPCHECK}")
set(CMAKE_C_CPPCHECK ${CPPCHECK}
--enable=all
--inline-suppr
--quiet
--std=c${CMAKE_C_STANDARD}
--suppress=missingIncludeSystem
--suppress=unusedFunction
--template=gcc
)
endif()
##########################################################################
# Local #
##########################################################################
add_subdirectory(docs)
add_subdirectory(extra)
add_subdirectory(include)
add_subdirectory(src)