diff options
-rw-r--r-- | tools/driver/CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt index 1ad04c8dfd..1123d0d54b 100644 --- a/tools/driver/CMakeLists.txt +++ b/tools/driver/CMakeLists.txt @@ -13,5 +13,15 @@ add_clang_executable(clang 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++\")") |