diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2022-08-29 16:07:40 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2022-09-02 12:04:39 (GMT) |
commit | 93f2cd5b7c799492bf605f8c704cd5b29404d18f (patch) | |
tree | 6e312067710c36aa4afb34c9ba618a2e491751a4 /Modules/CMakeParseImplicitLinkInfo.cmake | |
parent | 96564c5b2d84568459c2b594a7db3baccb524260 (diff) | |
download | CMake-93f2cd5b7c799492bf605f8c704cd5b29404d18f.zip CMake-93f2cd5b7c799492bf605f8c704cd5b29404d18f.tar.gz CMake-93f2cd5b7c799492bf605f8c704cd5b29404d18f.tar.bz2 |
CMakeParseImplicitLinkInfo: Better detection of msvc
Use the compiler id information in addition to checking for `cl.exe`.
Diffstat (limited to 'Modules/CMakeParseImplicitLinkInfo.cmake')
-rw-r--r-- | Modules/CMakeParseImplicitLinkInfo.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 6bdefde..1773dc4 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -22,7 +22,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj set(log "") set(keywordArgs) - set(oneValueArgs COMPUTE_IMPLICIT_OBJECTS) + set(oneValueArgs COMPUTE_IMPLICIT_OBJECTS LANGUAGE) set(multiValueArgs ) cmake_parse_arguments(EXTRA_PARSE "${keywordArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) @@ -76,6 +76,11 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj endif() endif() set(is_msvc 0) + if(EXTRA_PARSE_LANGUAGE AND + ("x${CMAKE_${EXTRA_PARSE_LANGUAGE}_ID}" STREQUAL "xMSVC" OR + "x${CMAKE_${EXTRA_PARSE_LANGUAGE}_SIMULATE_ID}" STREQUAL "xMSVC")) + set(is_msvc 1) + endif() set(search_static 0) if("${cmd}" MATCHES "${linker_regex}") string(APPEND log " link line: [${line}]\n") |