blob: 95153b7d92643f4beb2c734c2c1c05e9e6ee723b (
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
|
cmake_minimum_required(VERSION 3.16)
project(test LANGUAGES C)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wall -Wextra -pedantic -std=c99
-ftrack-macro-expansion=0)
elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_compile_options("-fmacro-backtrace-limit=1")
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
# Enable a standard-conforming C99/C11 preprocessor.
add_compile_options("/std:c11")
elseif(CMAKE_C_COMPILER_ID STREQUAL "TinyCC")
add_compile_definitions(ML99_ALLOW_POOR_DIAGNOSTICS)
endif()
include_directories(../include)
add_executable(metalang99 metalang99.c)
add_executable(assert assert.c)
add_executable(choice choice.c)
add_executable(either either.c)
add_executable(gen gen.c)
add_executable(stmt stmt.c)
add_executable(lang lang.c)
add_executable(list list.c)
add_executable(bool bool.c)
add_executable(maybe maybe.c)
add_executable(nat nat.c)
add_executable(ident ident.c)
add_executable(tuple tuple.c)
add_executable(util util.c)
add_executable(variadics variadics.c)
add_executable(seq seq.c)
add_executable(rec eval/rec.c)
foreach(TARGET ${BUILDSYSTEM_TARGETS})
set_target_properties(TARGET PROPERTIES C_STANDARD 99 C_STANDARD_REQUIRED ON)
endforeach()
|