Start to split jump table analysis to two different slices.
[dyninst.git] / parseAPI / CMakeLists.txt
1 # CMake configuration for parseAPI directory
2
3 include_directories (
4     ${PROJECT_SOURCE_DIR}/parseAPI/src
5   )
6
7
8 set (SRC_LIST
9         src/ParserDetails.C 
10         src/Parser.C 
11         src/CFGFactory.C 
12         src/Function.C 
13         src/Block.C 
14         src/CodeObject.C 
15         src/debug_parse.C 
16         src/CodeSource.C 
17         src/ParseData.C
18         src/InstructionAdapter.C
19         src/Parser-speculative.C
20         src/ParseCallback.C 
21         src/IA_IAPI.C
22         src/IA_x86Details.C 
23         src/IA_powerDetails.C 
24         src/IA_aarch64Details.C 
25         src/IA_platformDetailsFactory.C 
26         src/CFGModifier.C
27         src/StackTamperVisitor.C
28         src/JumpTableFormatPred.C
29         src/IndirectAnalyzer.C
30         src/IndirectASTVisitor.C
31         src/SymbolicExpression.C
32         src/ThunkData.C
33         ../dataflowAPI/src/ABI.C 
34         src/dominator.C
35         src/LoopAnalyzer.C
36         src/Loop.C
37         src/LoopTreeNode.C
38         src/IdiomModelDesc.C
39         src/ProbabilisticParser.C
40     )
41
42 set(ROSE_SRC
43         ../dataflowAPI/src/ABI.C 
44         ../dataflowAPI/src/Absloc.C 
45         ../dataflowAPI/src/AbslocInterface.C 
46         ../dataflowAPI/src/convertOpcodes.C 
47         ../dataflowAPI/src/debug_dataflow.C 
48         ../dataflowAPI/src/ExpressionConversionVisitor.C 
49         ../dataflowAPI/src/InstructionCache.C 
50         ../dataflowAPI/src/liveness.C 
51         ../dataflowAPI/src/RegisterMap.C
52         ../dataflowAPI/src/RoseImpl.C
53         ../dataflowAPI/src/RoseInsnFactory.C
54         ../dataflowAPI/src/slicing.C
55         ../dataflowAPI/src/stackanalysis.C
56         ../dataflowAPI/src/SymbolicExpansion.C
57         ../dataflowAPI/src/SymEval.C
58         ../dataflowAPI/src/SymEvalPolicy.C
59         ../dataflowAPI/src/templates.C
60         ../dataflowAPI/src/Visitors.C
61         ../dataflowAPI/rose/ExtentMap.C
62         ../dataflowAPI/rose/rangemap.C
63         ../dataflowAPI/rose/util/Assert.C
64         ../dataflowAPI/rose/util/Message.C
65         ../dataflowAPI/rose/util/Sawyer.C
66         ../dataflowAPI/rose/util/Synchronization.C
67         ../dataflowAPI/rose/util/rose_getline.C
68         ../dataflowAPI/rose/util/SmallObject.C
69         ../dataflowAPI/rose/util/Stopwatch.C
70         ../dataflowAPI/rose/util/StringUtility.C
71         ../dataflowAPI/rose/util/Attribute.C
72         ../dataflowAPI/rose/util/Combinatorics.C
73         ../dataflowAPI/rose/util/LinearCongruentialGenerator.C
74         ../dataflowAPI/rose/semantics/BaseSemantics2.C
75         #../dataflowAPI/rose/semantics/ConcreteSemantics2.C
76         ../dataflowAPI/rose/semantics/DispatcherARM64.C
77         ../dataflowAPI/rose/semantics/RegisterParts.C
78         ../dataflowAPI/rose/semantics/Registers.C
79         #../dataflowAPI/rose/semantics/SMTSolver.C
80         ../dataflowAPI/rose/semantics/BinarySymbolicExpr.C
81         ../dataflowAPI/rose/semantics/RegisterStateGeneric.C
82         ../dataflowAPI/rose/semantics/SymEvalSemantics.C
83 )
84
85 # FIXME: Rose needs a bunch of warning cleanup
86 SET_SOURCE_FILES_PROPERTIES(${ROSE_SRC} PROPERTIES LANGUAGE CXX COMPILE_FLAGS -w)
87 set (SRC_LIST ${SRC_LIST}
88         ${ROSE_SRC}
89 )
90
91 if (LIGHTWEIGHT_SYMTAB)
92 set (SRC_LIST ${SRC_LIST}
93     src/SymLiteCodeSource.C
94 )
95 else()
96 set (SRC_LIST ${SRC_LIST}
97     src/SymtabCodeSource.C
98 )
99 endif()
100
101 if (PLATFORM MATCHES amd64 OR PLATFORM MATCHES i386 OR PLATFORM
102 MATCHES x86_64)
103 set (SRC_LIST ${SRC_LIST}
104      src/InstructionSource-x86.C
105      src/IA_x86.C
106 )
107 elseif (PLATFORM MATCHES ppc)
108 set (SRC_LIST ${SRC_LIST}
109      src/InstructionSource-power.C
110      src/IA_power.C
111 )
112 elseif (PLATFORM MATCHES aarch64)
113 set (SRC_LIST ${SRC_LIST}
114      src/InstructionSource-aarch64.C
115      src/IA_aarch64.C
116 )
117 endif()
118
119 if (ENABLE_PARSE_API_GRAPHS)
120 set (SRC_LIST ${SRC_LIST}
121      src/GraphAdapter.C
122     )
123 endif()
124
125
126 ADD_DEFINITIONS(-DPARSER_LIB)
127 ADD_DEFINITIONS(-DDATAFLOW_LIB)
128
129 if(WIN32)
130 ADD_DEFINITIONS(-DROSE_UTIL_EXPORTS)
131 ADD_DEFINITIONS(-DNOMINMAX)
132 endif()
133
134 dyninst_library(parseAPI common instructionAPI ${SYMREADER})
135
136 target_link_private_libraries(parseAPI ${Boost_LIBRARIES})
137
138 if (WIN32)
139 target_link_private_libraries(parseAPI shlwapi)
140 endif()
141
142 FILE (GLOB headers "h/*.h")
143 FILE (GLOB dataflowheaders "../dataflowAPI/h/*.h")
144 set_target_properties (parseAPI PROPERTIES PUBLIC_HEADER "${headers};${dataflowheaders}")
145 if (USE_COTIRE)
146     cotire(parseAPI)
147 endif()
148 if(${ENABLE_STATIC_LIBS})
149   set_target_properties (parseAPI_static PROPERTIES PUBLIC_HEADER "${headers};${dataflowheaders}")
150 endif()
151
152 install (TARGETS parseAPI
153     RUNTIME DESTINATION ${INSTALL_LIB_DIR}
154     LIBRARY DESTINATION ${INSTALL_LIB_DIR}
155     ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
156     PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})