summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-04-19 13:44:38 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-04-19 13:44:51 (GMT)
commitf6ea1b59e18f42dcc39436558a457fc40ebd3ccc (patch)
treea685faa54e98697fb605c48834f883929a1abf10 /Modules
parent9619dd3a5b5dad5bdd0c36b06ff6a55d36bd89b5 (diff)
parent4c741d945a343f4979fabf3f1b7509c4b70267bb (diff)
downloadCMake-f6ea1b59e18f42dcc39436558a457fc40ebd3ccc.zip
CMake-f6ea1b59e18f42dcc39436558a457fc40ebd3ccc.tar.gz
CMake-f6ea1b59e18f42dcc39436558a457fc40ebd3ccc.tar.bz2
Merge topic 'cxxprefix'
4c741d945a BinUtils: Restore toolchain prefix detection from compiler name 'c++' Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Thomas Bernard <thomas@famillebernardgouriou.fr> Merge-request: !6011
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake2
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})