summaryrefslogtreecommitdiff
path: root/tools/diagtool/CMakeLists.txt
blob: a95444be40ee56fd2eaa39199d6acdf267824a10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
set(LLVM_LINK_COMPONENTS
  Support
  )

add_clang_executable(diagtool
  diagtool_main.cpp
  DiagTool.cpp
  DiagnosticNames.cpp
  FindDiagnosticID.cpp
  ListWarnings.cpp
  ShowEnabledWarnings.cpp
  TreeView.cpp
)

clang_target_link_libraries(diagtool
  PRIVATE
  clangBasic
  clangFrontend
  )

if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
  install(TARGETS diagtool
    COMPONENT diagtool
    RUNTIME DESTINATION bin)

  if (NOT LLVM_ENABLE_IDE)
    add_llvm_install_targets(install-diagtool
      DEPENDS diagtool
      COMPONENT diagtool)
  endif()
endif()