diff options
author | Francisco Facioni <fran6co@gmail.com> | 2020-01-10 14:03:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-03-03 13:31:13 (GMT) |
commit | 55196a1440e26917d40e6a7a3eb8d9fb323fa657 (patch) | |
tree | c61bfa5795dffcb5cc70981f2c7fdf52ccfb7cfb /Modules/CMakeFindBinUtils.cmake | |
parent | 2caae281722b645a5842e1f1689b152b72bb6038 (diff) | |
download | CMake-55196a1440e26917d40e6a7a3eb8d9fb323fa657.zip CMake-55196a1440e26917d40e6a7a3eb8d9fb323fa657.tar.gz CMake-55196a1440e26917d40e6a7a3eb8d9fb323fa657.tar.bz2 |
MSVC: Use 'lib' instead of 'link /lib' to create static libraries
`link.exe /lib` is an undocumented flag and it just calls `lib.exe`.
Also `link.exe` doesn't parse the `/lib` option correctly when in a
response file.
Diffstat (limited to 'Modules/CMakeFindBinUtils.cmake')
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index c23e447..de9ef9a 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -75,6 +75,7 @@ if(("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_SIMULATE_ID}" STREQUAL "xMSVC" AND endif() find_program(CMAKE_LINKER NAMES ${_CMAKE_ADDITIONAL_LINKER_NAMES} link HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + find_program(CMAKE_AR NAMES lib HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) find_program(CMAKE_MT NAMES mt HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) list(APPEND _CMAKE_TOOL_VARS LINKER MT) |