From 4c741d945a343f4979fabf3f1b7509c4b70267bb Mon Sep 17 00:00:00 2001 From: Lihua Zhao Date: Fri, 16 Apr 2021 15:31:26 +0800 Subject: 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 --- Modules/CMakeDetermineCXXCompiler.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}) -- cgit v0.12