From 6e527c2d385156bea79f6fe0647f4b9dba3c5022 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 13 Dec 2023 10:36:25 -0500 Subject: LinkerId: Fix detection of linker tool for Clang on OpenBSD Do not match quotes as part of the path. --- Modules/CMakeParseImplicitLinkInfo.cmake | 2 +- .../RunCMake/ParseImplicitLinkInfo/results/openbsd-C-Clang-5.0.1.output | 2 +- .../ParseImplicitLinkInfo/results/openbsd-CXX-Clang-5.0.1.output | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index dc7ea17..fcbfc11 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -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 "") diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-C-Clang-5.0.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-C-Clang-5.0.1.output index a8e257e..76ec3b9 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-C-Clang-5.0.1.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-C-Clang-5.0.1.output @@ -1,3 +1,3 @@ libs=compiler_rt;c;compiler_rt dirs=/usr/lib -linker_tool=/usr/bin/ld.* +linker_tool=/usr/bin/ld diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-CXX-Clang-5.0.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-CXX-Clang-5.0.1.output index de0ad29..791249e 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-CXX-Clang-5.0.1.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-CXX-Clang-5.0.1.output @@ -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 -- cgit v0.12