-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
109 lines (98 loc) · 2.96 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
cmake_minimum_required(VERSION 3.13)
project(titanos)
find_package(LLVM REQUIRED CONFIG)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
set(CMAKE_C_STANDARD 11)
include_directories(titanos/src)
include_directories(titanos/src/building)
include_directories(titanos/src/codegen)
include_directories(titanos/src/readers)
include_directories(titanos/src/targets)
set(LLVM_LINK_COMPONENTS
Analysis
BitReader
Core
ExecutionEngine
InstCombine
Interpreter
MC
MCDisassembler
MCJIT
Object
OrcJIT
RuntimeDyld
ScalarOpts
Support
Target
TransformUtils
native
nativecodegen
)
llvm_map_components_to_libnames(llvm_libs support core irreader ${LLVM_LINK_COMPONENTS})
add_executable(titanos
titanos/src/building/builder.c
titanos/src/building/builder.h
titanos/src/building/dependecy.h
titanos/src/codegen/codegen.c
titanos/src/codegen/codegen.h
titanos/src/readers/manifest.c
titanos/src/readers/manifest.h
titanos/src/readers/toml.c
titanos/src/readers/toml.h
titanos/src/targets/target_info.c
titanos/src/targets/target_info.h
titanos/src/ansi_color.h
titanos/src/arena_allocator.c
titanos/src/arena_allocator.h
titanos/src/array.c
titanos/src/array.h
titanos/src/ast_types.c
titanos/src/ast_types.h
titanos/src/ast_utils.c
titanos/src/ast_utils.h
titanos/src/attributes.c
titanos/src/attributes.h
titanos/src/common.h
titanos/src/component.c
titanos/src/component.h
titanos/src/constant_folding.c
titanos/src/constant_folding.h
titanos/src/debug.c
titanos/src/debug.h
titanos/src/diagnostics.c
titanos/src/diagnostics.h
titanos/src/error.c
titanos/src/error.h
titanos/src/file.c
titanos/src/file.h
titanos/src/fnv.c
titanos/src/fnv.h
titanos/src/lexer.c
titanos/src/lexer.h
titanos/src/module.c
titanos/src/module.h
titanos/src/parser.c
titanos/src/parser.h
titanos/src/parsing.c
titanos/src/parsing.h
titanos/src/printer.h
titanos/src/scope.c
titanos/src/scope.h
titanos/src/scratch_buffer.c
titanos/src/scratch_buffer.h
titanos/src/semantic_analysis.c
titanos/src/semantic_analysis.h
titanos/src/str_utils.h
titanos/src/string_utils.h
titanos/src/symbol.c
titanos/src/table.c
titanos/src/table.h
titanos/src/tests.c
titanos/src/tests.h
titanos/src/vector.c
titanos/src/vector.h
titanos/main.c)
target_link_libraries(titanos ${llvm_libs})