From: Douglas Gregor Date: Thu, 19 Nov 2009 05:46:45 +0000 (+0000) Subject: CMake goop to create clang++ symlink X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c720a4d6a69b33bc69729ad269c251bd32215851;p=clang CMake goop to create clang++ symlink git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89320 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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++\")")