Merge branch 'IndirectControlFlow' into parsing
[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_platformDetailsFactory.C 
25         src/CFGModifier.C
26         src/StackTamperVisitor.C
27         src/JumpTablePred.C
28         src/BoundFactCalculator.C
29         src/BoundFactData.C
30         src/IndirectAnalyzer.C
31         src/IndirectASTVisitor.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         ../dataflowAPI/src/ABI.C 
41         ../dataflowAPI/src/Absloc.C 
42         ../dataflowAPI/src/AbslocInterface.C 
43         ../dataflowAPI/src/convertOpcodes.C 
44         ../dataflowAPI/src/debug_dataflow.C 
45         ../dataflowAPI/src/ExpressionConversionVisitor.C 
46         ../dataflowAPI/src/InstructionCache.C 
47         ../dataflowAPI/src/liveness.C 
48         ../dataflowAPI/src/RegisterMap.C 
49         ../dataflowAPI/src/RoseImpl.C 
50         ../dataflowAPI/src/RoseInsnFactory.C 
51         ../dataflowAPI/src/slicing.C 
52         ../dataflowAPI/src/stackanalysis.C 
53         ../dataflowAPI/src/SymbolicExpansion.C 
54         ../dataflowAPI/src/SymEval.C 
55         ../dataflowAPI/src/SymEvalPolicy.C 
56         ../dataflowAPI/src/templates.C 
57         ../dataflowAPI/src/Visitors.C 
58     )
59
60 if (LIGHTWEIGHT_SYMTAB)
61 set (SRC_LIST ${SRC_LIST}
62     src/SymLiteCodeSource.C
63 )
64 else()
65 set (SRC_LIST ${SRC_LIST}
66     src/SymtabCodeSource.C
67 )
68 endif()
69
70 if (PLATFORM MATCHES amd64 OR PLATFORM MATCHES i386 OR PLATFORM
71 MATCHES x86_64)
72 set (SRC_LIST ${SRC_LIST}
73      src/InstructionSource-x86.C
74      src/IA_x86.C
75 )
76 elseif (PLATFORM MATCHES ppc)
77 set (SRC_LIST ${SRC_LIST}
78      src/InstructionSource-power.C
79      src/IA_power.C
80 )
81 endif()
82
83 if (ENABLE_PARSE_API_GRAPHS)
84 set (SRC_LIST ${SRC_LIST}
85      src/GraphAdapter.C
86     )
87 endif()
88
89 SET_SOURCE_FILES_PROPERTIES(${SRC_LIST} PROPERTIES LANGUAGE CXX)
90
91 ADD_DEFINITIONS(-DPARSER_LIB)
92 ADD_DEFINITIONS(-DDATAFLOW_LIB)
93
94 add_library (parseAPI ${SRC_LIST})
95 add_library (parseAPI_static STATIC ${SRC_LIST})
96 target_link_private_libraries(parseAPI common)
97 target_link_private_libraries(parseAPI instructionAPI)
98
99 if (LIGHTWEIGHT_SYMTAB)
100 target_link_private_libraries(parseAPI symLite)
101 else()
102 target_link_private_libraries(parseAPI symtabAPI)
103 endif()
104
105 FILE (GLOB headers "h/*.h")
106 FILE (GLOB dataflowheaders "../dataflowAPI/h/*.h")
107 set_target_properties (parseAPI parseAPI_static PROPERTIES PUBLIC_HEADER "${headers};${dataflowheaders}")
108
109
110 INSTALL (TARGETS parseAPI parseAPI_static
111         EXPORT DyninstTargets
112         RUNTIME DESTINATION ${INSTALL_LIB_DIR}
113         LIBRARY DESTINATION ${INSTALL_LIB_DIR}
114         ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
115         PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})