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