aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-19 05:46:45 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-19 05:46:45 +0000
commitc720a4d6a69b33bc69729ad269c251bd32215851 (patch)
tree914dac3320f3f7ec691ec04e1c6db69a57fd54da
parentc59dc9274612f318d43910a3b5de19997a8eb656 (diff)
CMake goop to create clang++ symlink
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89320 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/driver/CMakeLists.txt10
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++\")")