1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00
Commit Graph

7 Commits

Author SHA1 Message Date
Brad King
629eb3926b Tests: Extend ParseImplicit*Info with static GNU runtime library flags
Generate sample input data with GNU 10.2.1 compilers using flags like
`-static-libstdc++` and `-static-libgfortran`.
2021-06-03 08:12:11 -04:00
Brad King
9d0f8c3e56 Tests: Teach RunCMake.ParseImplicitLinkInfo to match output by regex
As in commit 6bc6fc2a7f (Tests: Teach RunCMake.ParseImplicitIncludeInfo
to match output by regex, 2019-04-08, v3.14.2~5^2~1).
2021-06-03 08:12:11 -04:00
Robert Maynard
764606e256 CMakeDetermineCompilerABI: Extract lib arch from implicit object file paths
The NVHPC compiler does not have any implicit link directories that can
be used to detect `CMAKE_LIBRARY_ARCHITECTURE`, but it does have
implicit object files.  Extract implicit object file paths from link
lines and check them for the `CMAKE_LIBRARY_ARCHITECTURE` pattern.

Issue: #22024
2021-04-05 17:41:10 -04:00
Robert Maynard
5d44d73bbe CMakeDetermineCompilerABI: Revert "Parse library arch from versioned paths"
The change in commit 657fc3a9a7 (CMakeDetermineCompilerABI: Parse
library arch from versioned paths, 2021-02-03, v3.20.0-rc1~40^2) caused
`CMAKE_LIBRARY_ARCHITECTURE` to be populated on non-multiarch platforms
if their compilers happen to use `$arch/$version` library directories.
Revert the use of versioned library paths.

Fixes: #22024
2021-04-05 16:40:43 -04:00
Robert Maynard
657fc3a9a7 CMakeDetermineCompilerABI: Parse library arch from versioned paths
Teach CMake how to extract `CMAKE_<LANG>_LIBRARY_ARCHITECTURE` from
versioned paths such as `/usr/lib/gcc/x86_64-linux-gnu/9`. These kind of
paths are generated by NVHPC compilers.
2021-02-04 15:17:49 -05:00
Robert Maynard
b5f20da94d CMakeParseImplicitLinkInfo supports comma separated link lines
It is currently presumed that the linker will generate
a space separated line. This is not the case for some
compilers such as IBM XL where it can output space or
comma separated. This is particularly apparent when IBM XL
is used as the host compiler for CUDA as it generates a comma
separated link line.
2019-08-28 10:39:53 -04:00
Robert Maynard
2200bc068b Introduce a ParseImplicitLinkInfo test
By sharing the information used by ParseImplicitIncludeInfo we can
also verify the parsing of implicit link info such as directories.
2019-08-28 10:39:53 -04:00