[cfe-commits] r126219 - /cfe/trunk/tools/driver/clang_symlink.cmake
Oscar Fuentes
ofv at wanadoo.es
Tue Feb 22 05:05:16 PST 2011
Author: ofv
Date: Tue Feb 22 07:05:15 2011
New Revision: 126219
URL: http://llvm.org/viewvc/llvm-project?rev=126219&view=rev
Log:
CMAKE_EXECUTABLE_SUFFIX is undefined when a cmake script is executed
with cmake -P ... so we need to deduce the correct executable prefix.
Fixes PR9286.
Modified:
cfe/trunk/tools/driver/clang_symlink.cmake
Modified: cfe/trunk/tools/driver/clang_symlink.cmake
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/clang_symlink.cmake?rev=126219&r1=126218&r2=126219&view=diff
==============================================================================
--- cfe/trunk/tools/driver/clang_symlink.cmake (original)
+++ cfe/trunk/tools/driver/clang_symlink.cmake Tue Feb 22 07:05:15 2011
@@ -9,9 +9,16 @@
set(CLANGXX_LINK_OR_COPY copy)
endif()
+# CMAKE_EXECUTABLE_SUFFIX is undefined on cmake scripts. See PR9286.
+if( WIN32 )
+ set(EXECUTABLE_SUFFIX ".exe")
+else()
+ set(EXECUTABLE_SUFFIX "")
+endif()
+
set(bindir "${CLANGXX_DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/")
-set(clang "clang${CMAKE_EXECUTABLE_SUFFIX}")
-set(clangxx "clang++${CMAKE_EXECUTABLE_SUFFIX}")
+set(clang "clang${EXECUTABLE_SUFFIX}")
+set(clangxx "clang++${EXECUTABLE_SUFFIX}")
message("Creating clang++ executable based on ${clang}")
More information about the cfe-commits
mailing list