diff options
author | Lihua Zhao <lihua.zhao@windriver.com> | 2021-04-16 07:31:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-04-16 13:20:16 (GMT) |
commit | 4c741d945a343f4979fabf3f1b7509c4b70267bb (patch) | |
tree | 305f52a3fd4801d606d68ceac38046293215deed | |
parent | 81d796e3f2f1080cc5f3c621a13858bf2c99ffb9 (diff) | |
download | CMake-4c741d945a343f4979fabf3f1b7509c4b70267bb.zip CMake-4c741d945a343f4979fabf3f1b7509c4b70267bb.tar.gz CMake-4c741d945a343f4979fabf3f1b7509c4b70267bb.tar.bz2 |
BinUtils: Restore toolchain prefix detection from compiler name 'c++'
Since commit b12aec6c8d (BinUtils: prefer bin utils matching the
compiler version extension, 2020-12-11, v3.20.0-rc1~171^2) we recognize
`clangg++` and `g++` but not `c++`. Restore `[gc]` in place of `g`
in the regex, as we had before that change.
Fixes: #22069
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index fd07a5c..3d1a7bb 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -161,7 +161,7 @@ if (NOT _CMAKE_TOOLCHAIN_PREFIX) if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|QCC") get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME) - if (COMPILER_BASENAME MATCHES "^(.+-)?(clang\\+\\+|g\\+\\+|clang-cl)(-[0-9]+(\\.[0-9]+)*)?(-[^.]+)?(\\.exe)?$") + if (COMPILER_BASENAME MATCHES "^(.+-)?(clang\\+\\+|[gc]\\+\\+|clang-cl)(-[0-9]+(\\.[0-9]+)*)?(-[^.]+)?(\\.exe)?$") set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) set(_CMAKE_TOOLCHAIN_SUFFIX ${CMAKE_MATCH_3}) set(_CMAKE_COMPILER_SUFFIX ${CMAKE_MATCH_5}) |