summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2017-04-02 14:29:31 (GMT)
committerBrad King <brad.king@kitware.com>2017-04-03 18:10:50 (GMT)
commit73934188446d2f8b149d5458008e1b267b37c3d9 (patch)
treebc3b6132bb39966d789b92d3f75cd10ba4f29d02 /Modules/Compiler
parentb2feb958ac29d37bfba419043250939c90d36dca (diff)
downloadCMake-73934188446d2f8b149d5458008e1b267b37c3d9.zip
CMake-73934188446d2f8b149d5458008e1b267b37c3d9.tar.gz
CMake-73934188446d2f8b149d5458008e1b267b37c3d9.tar.bz2
Rename CMAKE_GCC_{AR,RANLIB} to CMAKE_LANG_COMPILER_{AR,RANLIB}
The variables recently added by commit b9d36826 (Add 'CMAKE_GCC_AR' and 'CMAKE_GCC_RANLIB' variables, 2017-03-08) are more appropriately managed with language-specific names rather than toolchain-specific names.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/GNU-FindBinUtils.cmake4
-rw-r--r--Modules/Compiler/GNU.cmake6
2 files changed, 5 insertions, 5 deletions
diff --git a/Modules/Compiler/GNU-FindBinUtils.cmake b/Modules/Compiler/GNU-FindBinUtils.cmake
index 466d4cf..1aa0219 100644
--- a/Modules/Compiler/GNU-FindBinUtils.cmake
+++ b/Modules/Compiler/GNU-FindBinUtils.cmake
@@ -9,7 +9,7 @@ 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
-find_program(CMAKE_GCC_AR NAMES
+find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR NAMES
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar"
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x_y}"
HINTS ${__gcc_hints}
@@ -17,7 +17,7 @@ find_program(CMAKE_GCC_AR NAMES
)
# http://manpages.ubuntu.com/manpages/wily/en/man1/gcc-ranlib.1.html
-find_program(CMAKE_GCC_RANLIB NAMES
+find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib"
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x_y}"
HINTS ${__gcc_hints}
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
index 4b1c598..0a510f5 100644
--- a/Modules/Compiler/GNU.cmake
+++ b/Modules/Compiler/GNU.cmake
@@ -73,15 +73,15 @@ macro(__compiler_gnu lang)
#
# [1]: https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/Optimize-Options.html
set(CMAKE_${lang}_ARCHIVE_CREATE_IPO
- "${CMAKE_GCC_AR} cr <TARGET> <LINK_FLAGS> <OBJECTS>"
+ "${CMAKE_${lang}_COMPILER_AR} cr <TARGET> <LINK_FLAGS> <OBJECTS>"
)
set(CMAKE_${lang}_ARCHIVE_APPEND_IPO
- "${CMAKE_GCC_AR} r <TARGET> <LINK_FLAGS> <OBJECTS>"
+ "${CMAKE_${lang}_COMPILER_AR} r <TARGET> <LINK_FLAGS> <OBJECTS>"
)
set(CMAKE_${lang}_ARCHIVE_FINISH_IPO
- "${CMAKE_GCC_RANLIB} <TARGET>"
+ "${CMAKE_${lang}_COMPILER_RANLIB} <TARGET>"
)
endif()
endmacro()