summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2021-02-03 22:31:08 (GMT)
committerBrad King <brad.king@kitware.com>2021-02-04 20:17:49 (GMT)
commit657fc3a9a719831f9943c552e86e58ae283dad43 (patch)
tree244511bcf923be35fe38c22aea3a19580dbf93e6 /Modules/Platform
parentc28dbd7e308968089bf97df71d4fd74c99e718f1 (diff)
downloadCMake-657fc3a9a719831f9943c552e86e58ae283dad43.zip
CMake-657fc3a9a719831f9943c552e86e58ae283dad43.tar.gz
CMake-657fc3a9a719831f9943c552e86e58ae283dad43.tar.bz2
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.
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Linux.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake
index b5d5464..23b48bd 100644
--- a/Modules/Platform/Linux.cmake
+++ b/Modules/Platform/Linux.cmake
@@ -48,6 +48,7 @@ endif()
# Match multiarch library directory names.
set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*")
+set(CMAKE_LIBRARY_ARCHITECTURE_REGEX_VERSIONED "gcc/[a-z0-9_]+(-[a-z0-9_]+)?-linux(-gnu)?/[0-9]+(\\.[0-9]+\\.[0-9]+)*")
include(Platform/UnixPaths)