-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
51 lines (45 loc) · 971 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
cmake_minimum_required(VERSION 3.27)
project(tige C)
set(CMAKE_C_STANDARD 23)
set(DEBUG_OPTIONS
-std=c2x
-g
-Wall
-Wextra
-DDEBUG
-O0
)
set(RELEASE_OPTIONS
-std=c2x
-O03
-DNDEBUG
-Wall
-Wextra
-Werror
-march=native
-flto
-ffast-math
-fno-unroll-loops
-fprofile-use
)
add_compile_definitions(LEXER_DEBUG)
add_executable(tige main.c
lexer.c
parser.c
ast.c
evaluator.c
context.c
error.c
symbol_table.c
memory.c
compiler.c
bytecode_buffer.c
vm.c
op_handlers.c
value.c
object.c
functions.c
garbage_collector.c
tige_string.c)
target_compile_options(${PROJECT_NAME} PUBLIC "$<$<CONFIG:DEBUG>:${DEBUG_OPTIONS}>")
target_compile_options(${PROJECT_NAME} PUBLIC "$<$<CONFIG:RELEASE>:${RELEASE_OPTIONS}>")