diff options
author | Brad King <brad.king@kitware.com> | 2017-05-16 13:53:29 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-05-16 13:53:32 (GMT) |
commit | 80e0ef4082d999e629688e9a6639ac498634b5ed (patch) | |
tree | c0f232387804c394e8c9651e98f6247936c129db /Modules | |
parent | 67d5593efaecc706bf5f0bac5e34cb7a09227e10 (diff) | |
parent | 75accaae8b6a691b031f268f8afc368791a53030 (diff) | |
download | CMake-80e0ef4082d999e629688e9a6639ac498634b5ed.zip CMake-80e0ef4082d999e629688e9a6639ac498634b5ed.tar.gz CMake-80e0ef4082d999e629688e9a6639ac498634b5ed.tar.bz2 |
Merge topic 'GNU-FindBinUtils-patterns'
75accaae GCC: more patterns for ar/ranlib
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !838
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/GNU-FindBinUtils.cmake | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Modules/Compiler/GNU-FindBinUtils.cmake b/Modules/Compiler/GNU-FindBinUtils.cmake index 1aa0219..142636c 100644 --- a/Modules/Compiler/GNU-FindBinUtils.cmake +++ b/Modules/Compiler/GNU-FindBinUtils.cmake @@ -2,6 +2,12 @@ if(NOT DEFINED _CMAKE_PROCESSING_LANGUAGE OR _CMAKE_PROCESSING_LANGUAGE STREQUAL message(FATAL_ERROR "Internal error: _CMAKE_PROCESSING_LANGUAGE is not set") endif() +# Ubuntu 16.04: +# * /usr/bin/gcc-ar-5 +# * /usr/bin/gcc-ranlib-5 +string(REGEX MATCH "^([0-9]+)" __version_x + "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION}") + string(REGEX MATCH "^([0-9]+\\.[0-9]+)" __version_x_y "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION}") @@ -10,16 +16,18 @@ get_filename_component(__gcc_hints "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPIL # http://manpages.ubuntu.com/manpages/wily/en/man1/gcc-ar.1.html find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR NAMES - "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar" "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x_y}" + "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x}" + "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar" HINTS ${__gcc_hints} DOC "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" ) # http://manpages.ubuntu.com/manpages/wily/en/man1/gcc-ranlib.1.html find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES - "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib" "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x_y}" + "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x}" + "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib" HINTS ${__gcc_hints} DOC "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" ) |