5f825220cc889d018c0eb3d75ca39f6ebc22a363
[oota-llvm.git] / tools / opt / CMakeLists.txt
1 set(LLVM_LINK_COMPONENTS
2   ${LLVM_TARGETS_TO_BUILD}
3   Analysis
4   BitWriter
5   CodeGen
6   Core
7   IPA
8   IPO
9   IRReader
10   InstCombine
11   Instrumentation
12   MC
13   ObjCARCOpts
14   ScalarOpts
15   Support
16   Target
17   TransformUtils
18   Vectorize
19   Passes
20   )
21
22 # Support plugins.
23 set(LLVM_NO_DEAD_STRIP 1)
24
25 add_llvm_tool(opt
26   AnalysisWrappers.cpp
27   BreakpointPrinter.cpp
28   GraphPrinters.cpp
29   NewPMDriver.cpp
30   PassPrinters.cpp
31   PrintSCC.cpp
32   opt.cpp
33   )
34 export_executable_symbols(opt)
35
36 if(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)
37   target_link_libraries(opt Polly)
38   if(POLLY_LINK_LIBS)
39     foreach(lib ${POLLY_LINK_LIBS})
40       target_link_libraries(opt ${lib})
41     endforeach(lib)
42   endif(POLLY_LINK_LIBS)
43 endif(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)