LinkerId: Update detection of linker tool for Xcode 15.3

Xcode now prints extra `ExecuteExternalTool` lines that happen to
mention the linker tool, but not in conjunction with actually linking
something.  Ignore them.
This commit is contained in:
Brad King
2024-03-12 09:48:01 -04:00
parent 3677b2d916
commit e572986231

View File

@@ -75,7 +75,7 @@ function(cmake_parse_implicit_link_info2 text log_var obj_regex)
set(linker_regex "^( *|.*[/\\])(${linker}|${startfile}|([^/\\]+-)?ld|collect2)[^/\\]*( |$)")
set(linker_exclude_regex "collect2 version |^[A-Za-z0-9_]+=|/ldfe ")
set(linker_tool_regex "^[ \t]*(->|\")?[ \t]*(([^\"]*[/\\])?(${linker}))(\"|,| |$)")
set(linker_tool_exclude_regex "cuda-fake-ld|-fuse-ld=")
set(linker_tool_exclude_regex "cuda-fake-ld|-fuse-ld=|^ExecuteExternalTool ")
set(linker_tool "NOTFOUND")
set(linker_tool_fallback "")
set(link_line_parsed 0)