diff options
author | Brad King <brad.king@kitware.com> | 2019-11-07 15:31:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-11-07 15:31:02 (GMT) |
commit | b2857514b0c08171a171d0e3ce72571c8074b78e (patch) | |
tree | d6838fc0a33c520964b0b0906a0bb0425b4d5747 /Modules/Compiler | |
parent | c1d5d5eb11e0260ffadda0851ac844ab46b6b179 (diff) | |
download | CMake-b2857514b0c08171a171d0e3ce72571c8074b78e.zip CMake-b2857514b0c08171a171d0e3ce72571c8074b78e.tar.gz CMake-b2857514b0c08171a171d0e3ce72571c8074b78e.tar.bz2 |
FindBinUtils: Revert "Use the compiler to get the path to compiler tools"
Revert commit b2fd479df5 (FindBinUtils: Use the compiler to get the path
to compiler tools, 2019-09-22, v3.16.0-rc1~51^2). The compiler's answer
may incorrectly come from the `PATH`. Another approach will be needed.
Fixes: #19934
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/GNU-FindBinUtils.cmake | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/Modules/Compiler/GNU-FindBinUtils.cmake b/Modules/Compiler/GNU-FindBinUtils.cmake index a47b7ad..097fbf3 100644 --- a/Modules/Compiler/GNU-FindBinUtils.cmake +++ b/Modules/Compiler/GNU-FindBinUtils.cmake @@ -15,27 +15,21 @@ string(REGEX MATCH "^([0-9]+\\.[0-9]+)" __version_x_y get_filename_component(__gcc_hints "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER}" DIRECTORY) # http://manpages.ubuntu.com/manpages/wily/en/man1/gcc-ar.1.html -__get_compiler_component( - CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR gcc-ar - HINTS - ${__gcc_hints} - NAMES - "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x_y}" - "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x}" - "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar" +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_COMPILER_SUFFIX}" + HINTS ${__gcc_hints} DOC "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" ) mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR) # http://manpages.ubuntu.com/manpages/wily/en/man1/gcc-ranlib.1.html -__get_compiler_component( - CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB gcc-ranlib - HINTS - ${__gcc_hints} - NAMES - "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x_y}" - "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x}" - "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib" +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_COMPILER_SUFFIX}" + HINTS ${__gcc_hints} DOC "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" ) mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB) |