Start adding support for generating CC1 command lines from CompilerInvocation
[llvm-project.git] / clang / tools / scan-view / CMakeLists.txt
blob22edb974bac7ebc7dcfa58db4142eb26fe983b04
1 option(CLANG_INSTALL_SCANVIEW "Install the scan-view tool" ON)
3 set(BinFiles
4       scan-view)
6 set(ShareFiles
7       ScanView.py
8       Reporter.py
9       startfile.py
10       FileRadar.scpt
11       GetRadarVersion.scpt
12       bugcatcher.ico)
14 if(CLANG_INSTALL_SCANVIEW)
15   foreach(BinFile ${BinFiles})
16     add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bin/${BinFile}
17                        COMMAND ${CMAKE_COMMAND} -E make_directory
18                          ${CMAKE_BINARY_DIR}/bin
19                        COMMAND ${CMAKE_COMMAND} -E copy
20                          ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}
21                          ${CMAKE_BINARY_DIR}/bin/
22                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
23     list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
24     install(PROGRAMS bin/${BinFile}
25             DESTINATION bin
26             COMPONENT scan-view)
27   endforeach()
29   foreach(ShareFile ${ShareFiles})
30     add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile}
31                        COMMAND ${CMAKE_COMMAND} -E make_directory
32                          ${CMAKE_BINARY_DIR}/share/scan-view
33                        COMMAND ${CMAKE_COMMAND} -E copy
34                          ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile}
35                          ${CMAKE_BINARY_DIR}/share/scan-view/
36                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile})
37     list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile})
38     install(FILES share/${ShareFile}
39             DESTINATION share/scan-view
40             COMPONENT scan-view)
41   endforeach()
43   add_custom_target(scan-view ALL DEPENDS ${Depends})
44   set_target_properties(scan-view PROPERTIES FOLDER "Misc")
46   if(NOT LLVM_ENABLE_IDE)
47     add_llvm_install_targets("install-scan-view"
48                              DEPENDS scan-view
49                              COMPONENT scan-view)
50   endif()
51 endif()