Allow accessing StateARM64's Dyninst::Address member in RegisterStateARM64 for use...
[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/JumpTablePred.C
29         src/BoundFactCalculator.C
30         src/BoundFactData.C
31         src/IndirectAnalyzer.C
32         src/IndirectASTVisitor.C
33         src/ThunkData.C
34         ../dataflowAPI/src/ABI.C 
35         src/dominator.C
36         src/LoopAnalyzer.C
37         src/Loop.C
38         src/LoopTreeNode.C
39         src/IdiomModelDesc.C
40         src/ProbabilisticParser.C
41         ../dataflowAPI/src/ABI.C 
42         ../dataflowAPI/src/Absloc.C 
43         ../dataflowAPI/src/AbslocInterface.C 
44         ../dataflowAPI/src/convertOpcodes.C 
45         ../dataflowAPI/src/debug_dataflow.C 
46         ../dataflowAPI/src/ExpressionConversionVisitor.C 
47         ../dataflowAPI/src/InstructionCache.C 
48         ../dataflowAPI/src/liveness.C 
49         ../dataflowAPI/src/RegisterMap.C
50                 ../dataflowAPI/src/RoseImpl.C
51                 ../dataflowAPI/rose/ExtentMap.C
52                 ../dataflowAPI/rose/rangemap.C
53                 ../dataflowAPI/rose/util/Assert.C
54                 ../dataflowAPI/rose/util/Message.C
55                 ../dataflowAPI/rose/util/Sawyer.C
56                 ../dataflowAPI/rose/util/Synchronization.C
57                 ../dataflowAPI/rose/util/rose_getline.C
58                 ../dataflowAPI/rose/util/SmallObject.C
59                 ../dataflowAPI/rose/util/Stopwatch.C
60                 ../dataflowAPI/rose/util/StringUtility.C
61                 ../dataflowAPI/rose/util/Attribute.C
62                 ../dataflowAPI/rose/util/Combinatorics.C
63                 ../dataflowAPI/rose/util/LinearCongruentialGenerator.C
64                 ../dataflowAPI/rose/semantics/BaseSemantics2.C
65                 #../dataflowAPI/rose/semantics/ConcreteSemantics2.C
66                 ../dataflowAPI/rose/semantics/DispatcherARM64.C
67                 ../dataflowAPI/rose/semantics/RegisterParts.C
68                 ../dataflowAPI/rose/semantics/Registers.C
69                 ../dataflowAPI/rose/semantics/SMTSolver.C
70                 ../dataflowAPI/rose/semantics/BinarySymbolicExpr.C
71                 ../dataflowAPI/rose/semantics/RegisterStateGeneric.C
72                 ../dataflowAPI/rose/semantics/SymEvalSemantics.C
73         ../dataflowAPI/src/RoseInsnFactory.C 
74         ../dataflowAPI/src/slicing.C 
75         ../dataflowAPI/src/stackanalysis.C 
76         ../dataflowAPI/src/SymbolicExpansion.C 
77         ../dataflowAPI/src/SymEval.C 
78         ../dataflowAPI/src/SymEvalPolicy.C 
79         ../dataflowAPI/src/templates.C 
80         ../dataflowAPI/src/Visitors.C 
81     )
82
83 if (LIGHTWEIGHT_SYMTAB)
84 set (SRC_LIST ${SRC_LIST}
85     src/SymLiteCodeSource.C
86 )
87 else()
88 set (SRC_LIST ${SRC_LIST}
89     src/SymtabCodeSource.C
90 )
91 endif()
92
93 if (PLATFORM MATCHES amd64 OR PLATFORM MATCHES i386 OR PLATFORM
94 MATCHES x86_64)
95 set (SRC_LIST ${SRC_LIST}
96      src/InstructionSource-x86.C
97      src/IA_x86.C
98 )
99 elseif (PLATFORM MATCHES ppc)
100 set (SRC_LIST ${SRC_LIST}
101      src/InstructionSource-power.C
102      src/IA_power.C
103 )
104 elseif (PLATFORM MATCHES aarch64)
105 set (SRC_LIST ${SRC_LIST}
106      src/InstructionSource-aarch64.C
107      src/IA_aarch64.C
108 )
109 endif()
110
111 if (ENABLE_PARSE_API_GRAPHS)
112 set (SRC_LIST ${SRC_LIST}
113      src/GraphAdapter.C
114     )
115 endif()
116
117 SET_SOURCE_FILES_PROPERTIES(${SRC_LIST} PROPERTIES LANGUAGE CXX COMPILE_FLAGS -w)
118
119 ADD_DEFINITIONS(-DPARSER_LIB)
120 ADD_DEFINITIONS(-DDATAFLOW_LIB)
121
122 dyninst_library(parseAPI common instructionAPI ${SYMREADER})
123
124 if (UNIX)
125         # Boost auto-links on Windows; don't double-link
126         target_link_private_libraries(parseAPI ${Boost_LIBRARIES})
127 endif()
128
129 FILE (GLOB headers "h/*.h")
130 FILE (GLOB dataflowheaders "../dataflowAPI/h/*.h")
131 set_target_properties (parseAPI PROPERTIES PUBLIC_HEADER "${headers};${dataflowheaders}")
132 if(${ENABLE_STATIC_LIBS})
133   set_target_properties (parseAPI_static PROPERTIES PUBLIC_HEADER "${headers};${dataflowheaders}")
134 endif()
135
136 install (TARGETS parseAPI
137     RUNTIME DESTINATION ${INSTALL_LIB_DIR}
138     LIBRARY DESTINATION ${INSTALL_LIB_DIR}
139     ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
140     PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})