Fix wrong register operands in x86-64 instruction decoding
[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_x86.C
23         src/IA_power.C
24         src/IA_aarch64.C
25         src/CFGModifier.C
26         src/StackTamperVisitor.C
27         src/JumpTableFormatPred.C
28         src/JumpTableIndexPred.C
29         src/IndirectAnalyzer.C
30         src/IndirectASTVisitor.C
31         src/SymbolicExpression.C
32         src/BoundFactCalculator.C
33         src/BoundFactData.C
34         src/ThunkData.C
35         ../dataflowAPI/src/ABI.C 
36         src/dominator.C
37         src/LoopAnalyzer.C
38         src/Loop.C
39         src/LoopTreeNode.C
40         src/IdiomModelDesc.C
41         src/ProbabilisticParser.C
42     )
43
44 set(ROSE_SRC
45         ../dataflowAPI/src/ABI.C 
46         ../dataflowAPI/src/Absloc.C 
47         ../dataflowAPI/src/AbslocInterface.C 
48         ../dataflowAPI/src/convertOpcodes.C 
49         ../dataflowAPI/src/debug_dataflow.C 
50         ../dataflowAPI/src/ExpressionConversionVisitor.C 
51         ../dataflowAPI/src/InstructionCache.C 
52         ../dataflowAPI/src/liveness.C 
53         ../dataflowAPI/src/RegisterMap.C
54         ../dataflowAPI/src/RoseImpl.C
55         ../dataflowAPI/src/RoseInsnFactory.C
56         ../dataflowAPI/src/slicing.C
57         ../dataflowAPI/src/stackanalysis.C
58         ../dataflowAPI/src/SymbolicExpansion.C
59         ../dataflowAPI/src/SymEval.C
60         ../dataflowAPI/src/SymEvalPolicy.C
61         ../dataflowAPI/src/templates.C
62         ../dataflowAPI/src/Visitors.C
63         ../dataflowAPI/rose/ExtentMap.C
64         ../dataflowAPI/rose/rangemap.C
65         ../dataflowAPI/rose/util/Assert.C
66         ../dataflowAPI/rose/util/Message.C
67         ../dataflowAPI/rose/util/Sawyer.C
68         ../dataflowAPI/rose/util/Synchronization.C
69         ../dataflowAPI/rose/util/rose_getline.C
70         ../dataflowAPI/rose/util/SmallObject.C
71         ../dataflowAPI/rose/util/Stopwatch.C
72         ../dataflowAPI/rose/util/StringUtility.C
73         ../dataflowAPI/rose/util/Attribute.C
74         ../dataflowAPI/rose/util/Combinatorics.C
75         ../dataflowAPI/rose/util/LinearCongruentialGenerator.C
76         ../dataflowAPI/rose/semantics/BaseSemantics2.C
77         #../dataflowAPI/rose/semantics/ConcreteSemantics2.C
78         ../dataflowAPI/rose/semantics/DispatcherARM64.C
79         ../dataflowAPI/rose/semantics/DispatcherPowerpc.C
80         ../dataflowAPI/rose/semantics/RegisterParts.C
81         ../dataflowAPI/rose/semantics/Registers.C
82         #../dataflowAPI/rose/semantics/SMTSolver.C
83         ../dataflowAPI/rose/semantics/BinarySymbolicExpr.C
84         ../dataflowAPI/rose/semantics/RegisterStateGeneric.C
85         ../dataflowAPI/rose/semantics/SymEvalSemantics.C
86 )
87
88 # FIXME: Rose needs a bunch of warning cleanup
89 SET_SOURCE_FILES_PROPERTIES(${ROSE_SRC} PROPERTIES LANGUAGE CXX COMPILE_FLAGS -w)
90 set (SRC_LIST ${SRC_LIST}
91         ${ROSE_SRC}
92 )
93
94 if (LIGHTWEIGHT_SYMTAB)
95 set (SRC_LIST ${SRC_LIST}
96     src/SymLiteCodeSource.C
97 )
98 else()
99 set (SRC_LIST ${SRC_LIST}
100     src/SymtabCodeSource.C
101 )
102 endif()
103
104 if (ENABLE_PARSE_API_GRAPHS)
105 set (SRC_LIST ${SRC_LIST}
106      src/GraphAdapter.C
107     )
108 endif()
109
110
111 ADD_DEFINITIONS(-DPARSER_LIB)
112 ADD_DEFINITIONS(-DDATAFLOW_LIB)
113
114 if(WIN32)
115 ADD_DEFINITIONS(-DROSE_UTIL_EXPORTS)
116 ADD_DEFINITIONS(-DNOMINMAX)
117 endif()
118
119 dyninst_library(parseAPI common instructionAPI ${SYMREADER})
120
121 target_link_private_libraries(parseAPI ${Boost_LIBRARIES})
122
123 if (WIN32)
124 target_link_private_libraries(parseAPI shlwapi)
125 endif()
126
127 FILE (GLOB headers "h/*.h")
128 FILE (GLOB dataflowheaders "../dataflowAPI/h/*.h")
129 set_target_properties (parseAPI PROPERTIES PUBLIC_HEADER "${headers};${dataflowheaders}")
130 if (USE_COTIRE)
131     cotire(parseAPI)
132 endif()
133 if(${ENABLE_STATIC_LIBS})
134   set_target_properties (parseAPI_static PROPERTIES PUBLIC_HEADER "${headers};${dataflowheaders}")
135 endif()
136
137 install (TARGETS parseAPI
138     RUNTIME DESTINATION ${INSTALL_LIB_DIR}
139     LIBRARY DESTINATION ${INSTALL_LIB_DIR}
140     ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
141     PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})