diff options
author | Brad King <brad.king@kitware.com> | 2013-04-08 16:40:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-04-08 17:03:56 (GMT) |
commit | fb9f73de644539b4759ba67041d92fc418db0ee9 (patch) | |
tree | 431d94dc05c1a538771ccc2bea75aaf0fc832eb8 /Modules/Platform/Windows-MSVC.cmake | |
parent | 42ba1b08f3bd5909238f7c49c31532105ef2b0e7 (diff) | |
download | CMake-fb9f73de644539b4759ba67041d92fc418db0ee9.zip CMake-fb9f73de644539b4759ba67041d92fc418db0ee9.tar.gz CMake-fb9f73de644539b4759ba67041d92fc418db0ee9.tar.bz2 |
MSVC: Invoke 'link' directly for executables
Update the CMAKE_<LANG>_LINK_EXECUTABLE rule variable to invoke the
linker directly instead of through the compiler. We already do this
for DLL linking with CMAKE_<LANG>_CREATE_SHARED_LIBRARY.
This also works around a VS 6 cl bug. While invoking the link tool
internally it fails to correctly quote flags like /pdb:... with spaces
in the value.
Diffstat (limited to 'Modules/Platform/Windows-MSVC.cmake')
-rw-r--r-- | Modules/Platform/Windows-MSVC.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 28abf05..794bde7 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -237,7 +237,7 @@ macro(__windows_compiler_msvc lang) set(CMAKE_${lang}_COMPILER_LINKER_OPTION_FLAG_EXECUTABLE "/link") set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1) set(CMAKE_${lang}_LINK_EXECUTABLE - "${_CMAKE_VS_LINK_EXE}<CMAKE_${lang}_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> <OBJECTS> /link /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") + "${_CMAKE_VS_LINK_EXE}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}") set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}") set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}") |