blob: 5c104b8e0c2f90314e4001d88cf2918d0a76af8c (
plain) (
blame)
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
|
cmake_minimum_required(VERSION 3.8)
set(CMAKE_C_STANDARD 99)
add_executable(
agbsum
"src/chkpar.c"
"src/exi.c"
"src/getsum.c"
"src/hlp.c"
"src/inidat.c"
"src/main.c"
"src/opn.c"
"src/pat.c"
"src/red.c"
)
target_include_directories(
agbsum PRIVATE
"include"
)
target_compile_definitions(
agbsum PRIVATE
_FORTIFY_SOURCE=$<IF:$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">,0,2>
)
if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang|GNU")
target_compile_options(
agbsum PRIVATE
$<IF:$<STREQUAL:"${CMAKE_BUILD_TYPE}","Debug">,-Og,-Ofast>
-Wall
-Wextra
-Wpedantic
-fdiagnostics-color=always
-g
)
endif()
|