diff options
author | Raphael Gozzo <raphael.rg91@gmail.com> | 2021-12-06 18:03:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-12-06 21:47:29 (GMT) |
commit | d4ba945c48a3af674bdd95157d18d6236f7c2472 (patch) | |
tree | a43dd3d0f76e089e28d911fc2aa74be053d0f98c /Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake | |
parent | 60ebe5f3da67151f79e068f193ff309f7a358d41 (diff) | |
download | CMake-d4ba945c48a3af674bdd95157d18d6236f7c2472.zip CMake-d4ba945c48a3af674bdd95157d18d6236f7c2472.tar.gz CMake-d4ba945c48a3af674bdd95157d18d6236f7c2472.tar.bz2 |
CMakeParseLibraryArchitecture: Fix parsing /lib/<arch> implicit object path
The current regular expression is able to match `/usr/lib/<arch>`,
`/usr/usr/lib/<arch>`, `/usr/usr/usr/lib/<arch>`, ... but not
`/lib/<arch>`.
This behavior ends up causing the detected architecture to
be x86_64-pc-linux-gnu when the Clang compiler is installed on
a "non-system" location (like /opt/llvm-13) which, in turn, makes
almost every 'find_library()' fail because the correct
architecture is x86_64-linux-gnu.
This is due to a typo in commit 764606e256 (CMakeDetermineCompilerABI:
Extract lib arch from implicit object file paths, 2021-04-05,
v3.20.1~10^2), which used `+` instead of `?`.
Diffstat (limited to 'Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake')
-rw-r--r-- | Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake index dcdc7f1..51c8832 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake +++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake @@ -38,6 +38,7 @@ set(targets linux-C-XL-16.1.0.0 linux-CXX-XL-16.1.0.0 linux-CUDA-NVIDIA-10.1.168-CLANG linux-CUDA-NVIDIA-10.1.168-XLClang-v linux-CUDA-NVIDIA-9.2.148-GCC + linux-custom_clang-C-Clang-13.0.0 linux-custom_clang-CXX-Clang-13.0.0 mingw.org-C-GNU-4.9.3 mingw.org-CXX-GNU-4.9.3 netbsd-C-GNU-4.8.5 netbsd-CXX-GNU-4.8.5 netbsd_nostdinc-C-GNU-4.8.5 netbsd_nostdinc-CXX-GNU-4.8.5 |