diff options
author | Thomas Bernard <thomas@famillebernardgouriou.fr> | 2020-12-11 21:51:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-11 16:33:37 (GMT) |
commit | b12aec6c8daa3e087e6d0fa0441f59622251eb46 (patch) | |
tree | c42489408f58377d7d0c5a7e99cd6e3465909395 /Modules/CMakeDetermineCXXCompiler.cmake | |
parent | 06dfa5a7b6c0174bfcb4691a9aaf00809bd7271d (diff) | |
download | CMake-b12aec6c8daa3e087e6d0fa0441f59622251eb46.zip CMake-b12aec6c8daa3e087e6d0fa0441f59622251eb46.tar.gz CMake-b12aec6c8daa3e087e6d0fa0441f59622251eb46.tar.bz2 |
BinUtils: prefer bin utils matching the compiler version extension
Diffstat (limited to 'Modules/CMakeDetermineCXXCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 905eb25..7283bc2 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -160,8 +160,9 @@ 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 "^(.+-)(clan)?[gc]\\+\\+(-[0-9]+(\\.[0-9]+)*)?(-[^.]+)?(\\.exe)?$") + if (COMPILER_BASENAME MATCHES "^(.+-)?(clang\\+\\+|g\\+\\+|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}) elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") if(CMAKE_CXX_COMPILER_TARGET) |