LinkerId: Fix detection of linker tool for Clang on OpenBSD

Do not match quotes as part of the path.
This commit is contained in:
Brad King
2024-01-03 17:07:51 -05:00
parent 455aed3061
commit 6e527c2d38
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ function(cmake_parse_implicit_link_info2 text log_var obj_regex)
# whole line and just the command (argv[0]).
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_regex "^[ \t]*(->|\")?[ \t]*([^\"]*[/\\](${linker}))(\"|,| |$)")
set(linker_tool_exclude_regex "cuda-fake-ld|-fuse-ld=")
set(linker_tool "NOTFOUND")
set(linker_tool_fallback "")
@@ -1,3 +1,3 @@
libs=compiler_rt;c;compiler_rt
dirs=/usr/lib
linker_tool=/usr/bin/ld.*
linker_tool=/usr/bin/ld
@@ -1,3 +1,3 @@
libs=c\+\+;c\+\+abi;pthread;m;compiler_rt;c;compiler_rt
dirs=/usr/lib
linker_tool=/usr/bin/ld.*
linker_tool=/usr/bin/ld