summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/GNU-FindBinUtils.cmake
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2018-12-11 08:08:42 (GMT)
committerRegina Pfeifer <regina@mailbox.org>2019-02-06 16:43:55 (GMT)
commit42825fc220f9d05c8db629709a94deeced42be7a (patch)
tree8a3d02d7d0ab2d7335d7d3dc37f6961db50b21ed /Modules/Compiler/GNU-FindBinUtils.cmake
parent062cfd991faac000d484c74e5af7d65726c655dc (diff)
downloadCMake-42825fc220f9d05c8db629709a94deeced42be7a.zip
CMake-42825fc220f9d05c8db629709a94deeced42be7a.tar.gz
CMake-42825fc220f9d05c8db629709a94deeced42be7a.tar.bz2
MinGW: Fix locating BinUtils when compiler has a suffix
While all executables from a mingw toolchain share a common prefix, only the ones provided with the compiler have a suffix, the binutils do not. Fixes: #18879
Diffstat (limited to 'Modules/Compiler/GNU-FindBinUtils.cmake')
-rw-r--r--Modules/Compiler/GNU-FindBinUtils.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/Compiler/GNU-FindBinUtils.cmake b/Modules/Compiler/GNU-FindBinUtils.cmake
index 16b7bbd..097fbf3 100644
--- a/Modules/Compiler/GNU-FindBinUtils.cmake
+++ b/Modules/Compiler/GNU-FindBinUtils.cmake
@@ -18,7 +18,7 @@ get_filename_component(__gcc_hints "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPIL
find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR NAMES
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x_y}"
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x}"
- "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar"
+ "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar${_CMAKE_COMPILER_SUFFIX}"
HINTS ${__gcc_hints}
DOC "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler"
)
@@ -28,7 +28,7 @@ mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR)
find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x_y}"
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x}"
- "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib"
+ "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib${_CMAKE_COMPILER_SUFFIX}"
HINTS ${__gcc_hints}
DOC "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler"
)