r241403 - [CMake] clang-*.*: Prevent versioning if the buildhost is targeting for Win32.
NAKAMURA Takumi
geek4civic at gmail.com
Sun Jul 5 03:16:24 PDT 2015
Author: chapuni
Date: Sun Jul 5 05:16:24 2015
New Revision: 241403
URL: http://llvm.org/viewvc/llvm-project?rev=241403&view=rev
Log:
[CMake] clang-*.*: Prevent versioning if the buildhost is targeting for Win32.
CMake-2.8.12 is hardcoded to create symlinked clang.exe if the target property VERSION is present and the host is not Win32.
Then clang.exe-*.* is generated and clang.exe is symlinked to it.
lrwxrwxrwx. 1 bb bb 13 Jul 5 18:04 clang.exe -> clang.exe-3.7
-rwxr-x---. 1 bb bb 244763 Jul 5 18:04 clang++.exe
-rwxr-x---. 1 bb bb 244763 Jul 5 18:04 clang.exe-3.7
It made me unhappy when built binaries were copied to the Windows target.
FIXME: Could we just remove the target property VERSION in add_llvm_executable() ?
Modified:
cfe/trunk/tools/driver/CMakeLists.txt
Modified: cfe/trunk/tools/driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/CMakeLists.txt?rev=241403&r1=241402&r2=241403&view=diff
==============================================================================
--- cfe/trunk/tools/driver/CMakeLists.txt (original)
+++ cfe/trunk/tools/driver/CMakeLists.txt Sun Jul 5 05:16:24 2015
@@ -38,7 +38,11 @@ target_link_libraries(clang
clangFrontendTool
)
-set_target_properties(clang PROPERTIES VERSION ${CLANG_EXECUTABLE_VERSION})
+if(WIN32 AND NOT CYGWIN)
+ # Prevent versioning if the buildhost is targeting for Win32.
+else()
+ set_target_properties(clang PROPERTIES VERSION ${CLANG_EXECUTABLE_VERSION})
+endif()
# Support plugins.
if(CLANG_PLUGIN_SUPPORT)
More information about the cfe-commits
mailing list