-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathCMakeLists.txt
98 lines (91 loc) · 1.99 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
#
# Copyright (c) 2021-present, Trail of Bits, Inc.
# All rights reserved.
#
# This source code is licensed in accordance with the terms specified in
# the LICENSE file found in the root directory of this source tree.
#
set(exe_name "mx-index")
add_executable("${exe_name}"
"BuildAST.cpp"
"BuildAST.h"
"BuildPendingFragment.cpp"
"Compress.cpp"
"Compress.h"
"Codegen.cpp"
"Codegen.h"
"Context.cpp"
"Context.h"
"EntityMapper.cpp"
"EntityMapper.h"
"FindUsesInFragment.cpp"
"Hash.cpp"
"Hash.h"
"Importer.cpp"
"Importer.h"
"IndexCompileJob.cpp"
"IndexCompileJob.h"
"LabelEntitiesInFragment.cpp"
"LabelParentEntitiesInFragment.cpp"
"LinkDeclarationsAcrossFragments.cpp"
"LinkReferencesInFragment.cpp"
"Main.cpp"
"NameMangler.cpp"
"NameMangler.h"
"Parser.cpp"
"Parser.h"
"PendingFragment.h"
"Persist.cpp"
"Persist.h"
"PersistDeclarationInFragments.cpp"
"PrintTokenGraph.cpp"
"PrintTokenGraph.h"
"Pseudo.h"
"SerializePendingFragment.cpp"
"TokenTree.cpp"
"TokenTree.h"
"Util.cpp"
"Util.h"
"Visitor.cpp"
"Visitor.h"
"${MX_BOOTSTRAP_INDEX_SERIALIZE_H}"
"${MX_BOOTSTRAP_INDEX_SERIALIZE_CPP}"
"${MX_BOOTSTRAP_INCLUDE_VISITOR_INC_H}"
)
target_link_libraries("${exe_name}"
PRIVATE
${MX_BEGIN_FORCE_LOAD_GROUP}
"mx-util"
"mx-api"
"concurrentqueue"
${MX_BEGIN_FORCE_LOAD_LIB} pasta::pasta ${MX_END_FORCE_LOAD_LIB}
${MX_END_FORCE_LOAD_GROUP}
)
if(MX_ENABLE_VAST)
target_compile_definitions("${exe_name}"
PRIVATE
"MX_ENABLE_SOURCEIR"
)
target_link_libraries("${exe_name}"
PRIVATE
${MX_BEGIN_FORCE_LOAD_GROUP}
vast::vast
MLIRDLTI
MLIRStandard
MLIRLLVMIR
${MX_END_FORCE_LOAD_GROUP}
)
endif()
set_target_properties("${exe_name}" PROPERTIES LINKER_LANGUAGE CXX)
if(MX_ENABLE_INSTALL)
install(
TARGETS
"${exe_name}"
EXPORT
"${PROJECT_NAME}Targets"
RUNTIME
DESTINATION
"${CMAKE_INSTALL_BINDIR}"
)
find_and_install_llvm_dependencies()
endif()