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