[analyzer] Introduce libclangStaticAnalyzerFrontend and move Checkers/AnalysisConsume...
[clang/stm8.git] / tools / driver / CMakeLists.txt
blob6dc47d656cf9bee29af39982290b344ff9a1d84b
1 set( LLVM_USED_LIBS
2   clangAST
3   clangAnalysis
4   clangBasic
5   clangCodeGen
6   clangDriver
7   clangFrontend
8   clangFrontendTool
9   clangIndex
10   clangLex
11   clangParse
12   clangRewrite
13   clangSema
14   clangSerialization
15   clangStaticAnalyzerFrontend
16   clangStaticAnalyzerCheckers
17   clangStaticAnalyzerCore
18   )
20 set( LLVM_LINK_COMPONENTS
21   ${LLVM_TARGETS_TO_BUILD}
22   asmparser
23   bitreader
24   bitwriter
25   codegen
26   ipo
27   selectiondag
28   )
30 add_clang_executable(clang
31   driver.cpp
32   cc1_main.cpp
33   cc1as_main.cpp
34   )
36 if(UNIX)
37   set(CLANGXX_LINK_OR_COPY create_symlink)
38 else()
39   set(CLANGXX_LINK_OR_COPY copy)
40 endif()
42 # Create the clang++ symlink in the build directory.
43 set(clang_pp "${LLVM_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/clang++${CMAKE_EXECUTABLE_SUFFIX}")
44 add_custom_target(clang++ ALL
45   ${CMAKE_COMMAND} -E ${CLANGXX_LINK_OR_COPY}
46     "${LLVM_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/clang${CMAKE_EXECUTABLE_SUFFIX}"
47     "${clang_pp}"
48   DEPENDS clang)
49 set_property(DIRECTORY APPEND
50   PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${clang_pp})
52 install(TARGETS clang
53   RUNTIME DESTINATION bin)
55 # Create the clang++ symlink at installation time.
56 install(SCRIPT clang_symlink.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\")