summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-05 14:15:25 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-04-05 14:15:40 (GMT)
commit820af5f7974734e78db9896b4f182d667a491c4f (patch)
treed470f13e1ba1deaf2f0b7d55e6fa7a439a107e42
parent4046cb2d109bb91a16f53962219ad25c80d30755 (diff)
parent73934188446d2f8b149d5458008e1b267b37c3d9 (diff)
downloadCMake-820af5f7974734e78db9896b4f182d667a491c4f.zip
CMake-820af5f7974734e78db9896b4f182d667a491c4f.tar.gz
CMake-820af5f7974734e78db9896b4f182d667a491c4f.tar.bz2
Merge topic 'lang-specific-binutils'
73934188 Rename CMAKE_GCC_{AR,RANLIB} to CMAKE_LANG_COMPILER_{AR,RANLIB} Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !656
-rw-r--r--Help/manual/cmake-variables.7.rst4
-rw-r--r--Help/release/dev/compiler_archiving_tools.rst8
-rw-r--r--Help/release/dev/gcc_archiving_tools.rst8
-rw-r--r--Help/variable/CMAKE_LANG_COMPILER_AR.rst (renamed from Help/variable/CMAKE_GCC_AR.rst)6
-rw-r--r--Help/variable/CMAKE_LANG_COMPILER_RANLIB.rst (renamed from Help/variable/CMAKE_GCC_RANLIB.rst)6
-rw-r--r--Modules/CMakeASMCompiler.cmake.in4
-rw-r--r--Modules/CMakeCCompiler.cmake.in4
-rw-r--r--Modules/CMakeCXXCompiler.cmake.in4
-rw-r--r--Modules/CMakeDetermineASMCompiler.cmake4
-rw-r--r--Modules/CMakeFortranCompiler.cmake.in4
-rw-r--r--Modules/Compiler/GNU-FindBinUtils.cmake4
-rw-r--r--Modules/Compiler/GNU.cmake6
12 files changed, 33 insertions, 29 deletions
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 9d8d596..c45574f 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -40,8 +40,6 @@ Variables that Provide Information
/variable/CMAKE_FIND_PACKAGE_NAME
/variable/CMAKE_FIND_PACKAGE_SORT_DIRECTION
/variable/CMAKE_FIND_PACKAGE_SORT_ORDER
- /variable/CMAKE_GCC_AR
- /variable/CMAKE_GCC_RANLIB
/variable/CMAKE_GENERATOR
/variable/CMAKE_GENERATOR_PLATFORM
/variable/CMAKE_GENERATOR_TOOLSET
@@ -50,6 +48,8 @@ Variables that Provide Information
/variable/CMAKE_IMPORT_LIBRARY_SUFFIX
/variable/CMAKE_JOB_POOL_COMPILE
/variable/CMAKE_JOB_POOL_LINK
+ /variable/CMAKE_LANG_COMPILER_AR
+ /variable/CMAKE_LANG_COMPILER_RANLIB
/variable/CMAKE_LINK_LIBRARY_SUFFIX
/variable/CMAKE_LINK_SEARCH_END_STATIC
/variable/CMAKE_LINK_SEARCH_START_STATIC
diff --git a/Help/release/dev/compiler_archiving_tools.rst b/Help/release/dev/compiler_archiving_tools.rst
new file mode 100644
index 0000000..de3471d
--- /dev/null
+++ b/Help/release/dev/compiler_archiving_tools.rst
@@ -0,0 +1,8 @@
+compiler_archiving_tools
+------------------------
+
+* A :variable:`CMAKE_<LANG>_COMPILER_AR` variable was added to hold
+ the path to the GCC/Clang wrapper of ``ar``.
+
+* A :variable:`CMAKE_<LANG>_COMPILER_RANLIB` variable was added to hold
+ the path to the GCC/Clang wrapper of ``ranlib``.
diff --git a/Help/release/dev/gcc_archiving_tools.rst b/Help/release/dev/gcc_archiving_tools.rst
deleted file mode 100644
index b3cc7d6..0000000
--- a/Help/release/dev/gcc_archiving_tools.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-gcc_archiving_tools
--------------------
-
-* The :variable:`CMAKE_GCC_AR` variable with the path to GCC wrapper of ``ar``
- utility was added.
-
-* The :variable:`CMAKE_GCC_RANLIB` variable with the path to GCC wrapper of
- ``ranlib`` utility was added.
diff --git a/Help/variable/CMAKE_GCC_AR.rst b/Help/variable/CMAKE_LANG_COMPILER_AR.rst
index ac90b46..b83a1d4 100644
--- a/Help/variable/CMAKE_GCC_AR.rst
+++ b/Help/variable/CMAKE_LANG_COMPILER_AR.rst
@@ -1,7 +1,7 @@
-CMAKE_GCC_AR
-------------
+CMAKE_<LANG>_COMPILER_AR
+------------------------
A wrapper around ``ar`` adding the appropriate ``--plugin`` option for the
-GCC compiler. For other compilers variable is not defined.
+compiler.
See also :variable:`CMAKE_AR`.
diff --git a/Help/variable/CMAKE_GCC_RANLIB.rst b/Help/variable/CMAKE_LANG_COMPILER_RANLIB.rst
index 3d42aba..945160b 100644
--- a/Help/variable/CMAKE_GCC_RANLIB.rst
+++ b/Help/variable/CMAKE_LANG_COMPILER_RANLIB.rst
@@ -1,7 +1,7 @@
-CMAKE_GCC_RANLIB
-----------------
+CMAKE_<LANG>_COMPILER_RANLIB
+----------------------------
A wrapper around ``ranlib`` adding the appropriate ``--plugin`` option for the
-GCC compiler. For other compilers variable is not defined.
+compiler.
See also :variable:`CMAKE_RANLIB`.
diff --git a/Modules/CMakeASMCompiler.cmake.in b/Modules/CMakeASMCompiler.cmake.in
index ad65698..7b94d0f 100644
--- a/Modules/CMakeASMCompiler.cmake.in
+++ b/Modules/CMakeASMCompiler.cmake.in
@@ -1,9 +1,9 @@
set(CMAKE_ASM@ASM_DIALECT@_COMPILER "@_CMAKE_ASM_COMPILER@")
set(CMAKE_ASM@ASM_DIALECT@_COMPILER_ARG1 "@_CMAKE_ASM_COMPILER_ARG1@")
set(CMAKE_AR "@CMAKE_AR@")
-set(CMAKE_GCC_AR "@CMAKE_GCC_AR@")
+set(CMAKE_ASM@ASM_DIALECT@_COMPILER_AR "@_CMAKE_ASM_COMPILER_AR@")
set(CMAKE_RANLIB "@CMAKE_RANLIB@")
-set(CMAKE_GCC_RANLIB "@CMAKE_GCC_RANLIB@")
+set(CMAKE_ASM@ASM_DIALECT@_COMPILER_RANLIB "@_CMAKE_ASM_COMPILER_RANLIB@")
set(CMAKE_LINKER "@CMAKE_LINKER@")
set(CMAKE_ASM@ASM_DIALECT@_COMPILER_LOADED 1)
set(CMAKE_ASM@ASM_DIALECT@_COMPILER_ID "@_CMAKE_ASM_COMPILER_ID@")
diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in
index 102ab69..974a579 100644
--- a/Modules/CMakeCCompiler.cmake.in
+++ b/Modules/CMakeCCompiler.cmake.in
@@ -15,9 +15,9 @@ set(CMAKE_C_SIMULATE_VERSION "@CMAKE_C_SIMULATE_VERSION@")
@SET_MSVC_C_ARCHITECTURE_ID@
@SET_CMAKE_XCODE_CURRENT_ARCH@
set(CMAKE_AR "@CMAKE_AR@")
-set(CMAKE_GCC_AR "@CMAKE_GCC_AR@")
+set(CMAKE_C_COMPILER_AR "@CMAKE_C_COMPILER_AR@")
set(CMAKE_RANLIB "@CMAKE_RANLIB@")
-set(CMAKE_GCC_RANLIB "@CMAKE_GCC_RANLIB@")
+set(CMAKE_C_COMPILER_RANLIB "@CMAKE_C_COMPILER_RANLIB@")
set(CMAKE_LINKER "@CMAKE_LINKER@")
set(CMAKE_COMPILER_IS_GNUCC @CMAKE_COMPILER_IS_GNUCC@)
set(CMAKE_C_COMPILER_LOADED 1)
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in
index 3dae035..fda7950 100644
--- a/Modules/CMakeCXXCompiler.cmake.in
+++ b/Modules/CMakeCXXCompiler.cmake.in
@@ -16,9 +16,9 @@ set(CMAKE_CXX_SIMULATE_VERSION "@CMAKE_CXX_SIMULATE_VERSION@")
@SET_MSVC_CXX_ARCHITECTURE_ID@
@SET_CMAKE_XCODE_CURRENT_ARCH@
set(CMAKE_AR "@CMAKE_AR@")
-set(CMAKE_GCC_AR "@CMAKE_GCC_AR@")
+set(CMAKE_CXX_COMPILER_AR "@CMAKE_CXX_COMPILER_AR@")
set(CMAKE_RANLIB "@CMAKE_RANLIB@")
-set(CMAKE_GCC_RANLIB "@CMAKE_GCC_RANLIB@")
+set(CMAKE_CXX_COMPILER_RANLIB "@CMAKE_CXX_COMPILER_RANLIB@")
set(CMAKE_LINKER "@CMAKE_LINKER@")
set(CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@)
set(CMAKE_CXX_COMPILER_LOADED 1)
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index 7d5e2b2..87c6b28 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -157,6 +157,8 @@ set(_CMAKE_ASM_COMPILER "${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
set(_CMAKE_ASM_COMPILER_ID "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
set(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}")
set(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}")
+set(_CMAKE_ASM_COMPILER_AR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_AR}")
+set(_CMAKE_ASM_COMPILER_RANLIB "${CMAKE_ASM${ASM_DIALECT}_COMPILER_RANLIB}")
# configure variables set in this file for fast reload later on
configure_file(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
@@ -165,3 +167,5 @@ configure_file(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
set(_CMAKE_ASM_COMPILER)
set(_CMAKE_ASM_COMPILER_ARG1)
set(_CMAKE_ASM_COMPILER_ENV_VAR)
+set(_CMAKE_ASM_COMPILER_AR)
+set(_CMAKE_ASM_COMPILER_RANLIB)
diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in
index c49621b..d521190 100644
--- a/Modules/CMakeFortranCompiler.cmake.in
+++ b/Modules/CMakeFortranCompiler.cmake.in
@@ -8,9 +8,9 @@ set(CMAKE_Fortran_SIMULATE_ID "@CMAKE_Fortran_SIMULATE_ID@")
set(CMAKE_Fortran_SIMULATE_VERSION "@CMAKE_Fortran_SIMULATE_VERSION@")
@SET_MSVC_Fortran_ARCHITECTURE_ID@
set(CMAKE_AR "@CMAKE_AR@")
-set(CMAKE_GCC_AR "@CMAKE_GCC_AR@")
+set(CMAKE_Fortran_COMPILER_AR "@CMAKE_Fortran_COMPILER_AR@")
set(CMAKE_RANLIB "@CMAKE_RANLIB@")
-set(CMAKE_GCC_RANLIB "@CMAKE_GCC_RANLIB@")
+set(CMAKE_Fortran_COMPILER_RANLIB "@CMAKE_Fortran_COMPILER_RANLIB@")
set(CMAKE_COMPILER_IS_GNUG77 @CMAKE_COMPILER_IS_GNUG77@)
set(CMAKE_Fortran_COMPILER_LOADED 1)
set(CMAKE_Fortran_COMPILER_WORKS @CMAKE_Fortran_COMPILER_WORKS@)
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()