diff options
author | Brad King <brad.king@kitware.com> | 2019-02-07 11:55:40 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-02-07 11:55:53 (GMT) |
commit | 0741eda2468e482baf1b5ff6a3a8d376143171e4 (patch) | |
tree | 95a1bd34d827743f943fc5e43e97e33ab6fabd74 /Modules/CMakeDetermineCCompiler.cmake | |
parent | 982e6e777556de8db44b16b144ab62f4b7172319 (diff) | |
parent | 42825fc220f9d05c8db629709a94deeced42be7a (diff) | |
download | CMake-0741eda2468e482baf1b5ff6a3a8d376143171e4.zip CMake-0741eda2468e482baf1b5ff6a3a8d376143171e4.tar.gz CMake-0741eda2468e482baf1b5ff6a3a8d376143171e4.tar.bz2 |
Merge topic 'mingw-ar-suffix'
42825fc220 MinGW: Fix locating BinUtils when compiler has a suffix
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2924
Diffstat (limited to 'Modules/CMakeDetermineCCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCCompiler.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index d7f6f97..3ec534f 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -139,8 +139,9 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX) if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|QCC") get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME) - if (COMPILER_BASENAME MATCHES "^(.+-)(clang|g?cc)(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$") + if (COMPILER_BASENAME MATCHES "^(.+-)(clang|g?cc)(-[0-9]+(\\.[0-9]+)*)?(-[^.]+)?(\\.exe)?$") set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) + set(_CMAKE_COMPILER_SUFFIX ${CMAKE_MATCH_5}) elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") if(CMAKE_C_COMPILER_TARGET) set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_C_COMPILER_TARGET}-) |