aboutsummaryrefslogtreecommitdiff
path: root/tools/driver/CMakeLists.txt
blob: 1123d0d54bc59a2f6cf24804c741b271b208526e (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
set(LLVM_NO_RTTI 1)

set( LLVM_USED_LIBS
  clangDriver
  clangBasic
  )

set(LLVM_LINK_COMPONENTS system support bitreader bitwriter)

add_clang_executable(clang
  driver.cpp
  )

add_dependencies(clang clang-cc)

# Create the clang++ symlink in the build directory.
add_custom_target(clang++ ALL
  ${CMAKE_COMMAND} -E create_symlink 
    "${LLVM_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/clang"
    "${LLVM_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/clang++"
  DEPENDS clang)

install(TARGETS clang
  RUNTIME DESTINATION bin)

# Create the clang++ symlink at installation time.
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"${CMAKE_INSTALL_PREFIX}/bin/clang\" \"${CMAKE_INSTALL_PREFIX}/bin/clang++\")")