summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-05 14:05:55 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-05-05 14:06:02 (GMT)
commit084767a9ce22867156677c78763dd6917971f8f2 (patch)
tree16f4294c5e7e7735264f78796ab016dc4563d0b5
parent38868b47f70640afa04baf46b3642c5d6b5b380e (diff)
parentc33fb2e664f81f23b3141190dd2476d6599060e6 (diff)
downloadCMake-084767a9ce22867156677c78763dd6917971f8f2.zip
CMake-084767a9ce22867156677c78763dd6917971f8f2.tar.gz
CMake-084767a9ce22867156677c78763dd6917971f8f2.tar.bz2
Merge topic 'binutils-var-private' into release-3.20
c33fb2e664 BinUtils: Use more-private temporary variable names Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6085
-rw-r--r--Modules/CMakeFindBinUtils.cmake22
1 files changed, 12 insertions, 10 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index f32266f..4ce45af 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -123,19 +123,19 @@ else()
list(APPEND _CMAKE_TOOL_VARS AR RANLIB STRIP LINKER NM OBJDUMP OBJCOPY READELF DLLTOOL ADDR2LINE)
endif()
-foreach(_tool IN LISTS _CMAKE_TOOL_VARS)
- foreach(_name IN LISTS _CMAKE_${_tool}_NAMES)
+foreach(_CMAKE_TOOL IN LISTS _CMAKE_TOOL_VARS)
+ foreach(_CMAKE_TOOL_NAME IN LISTS _CMAKE_${_CMAKE_TOOL}_NAMES)
if(NOT _CMAKE_TOOLCHAIN_PREFIX STREQUAL "")
if(NOT _CMAKE_TOOLCHAIN_SUFFIX STREQUAL "")
- list(PREPEND _CMAKE_${_tool}_NAMES ${_name}${_CMAKE_TOOLCHAIN_SUFFIX})
+ list(PREPEND _CMAKE_${_CMAKE_TOOL}_NAMES ${_CMAKE_TOOL_NAME}${_CMAKE_TOOLCHAIN_SUFFIX})
endif()
- list(PREPEND _CMAKE_${_tool}_NAMES ${_CMAKE_TOOLCHAIN_PREFIX}${_name})
+ list(PREPEND _CMAKE_${_CMAKE_TOOL}_NAMES ${_CMAKE_TOOLCHAIN_PREFIX}${_CMAKE_TOOL_NAME})
endif()
if(NOT _CMAKE_TOOLCHAIN_SUFFIX STREQUAL "")
- list(PREPEND _CMAKE_${_tool}_NAMES ${_CMAKE_TOOLCHAIN_PREFIX}${_name}${_CMAKE_TOOLCHAIN_SUFFIX})
+ list(PREPEND _CMAKE_${_CMAKE_TOOL}_NAMES ${_CMAKE_TOOLCHAIN_PREFIX}${_CMAKE_TOOL_NAME}${_CMAKE_TOOLCHAIN_SUFFIX})
endif()
endforeach()
- find_program(CMAKE_${_tool} NAMES ${_CMAKE_${_tool}_NAMES} HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+ find_program(CMAKE_${_CMAKE_TOOL} NAMES ${_CMAKE_${_CMAKE_TOOL}_NAMES} HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
endforeach()
if(NOT CMAKE_RANLIB)
@@ -154,12 +154,14 @@ if(CMAKE_PLATFORM_HAS_INSTALLNAME)
endif()
# Mark any tool cache entries as advanced.
-foreach(_tool IN LISTS _CMAKE_TOOL_VARS)
- get_property(_CMAKE_TOOL_CACHED CACHE CMAKE_${_tool} PROPERTY TYPE)
+foreach(_CMAKE_TOOL IN LISTS _CMAKE_TOOL_VARS)
+ get_property(_CMAKE_TOOL_CACHED CACHE CMAKE_${_CMAKE_TOOL} PROPERTY TYPE)
if(_CMAKE_TOOL_CACHED)
- mark_as_advanced(CMAKE_${_tool})
+ mark_as_advanced(CMAKE_${_CMAKE_TOOL})
endif()
- unset(_CMAKE_${_tool}_NAMES)
+ unset(_CMAKE_${_CMAKE_TOOL}_NAMES)
endforeach()
unset(_CMAKE_TOOL_VARS)
unset(_CMAKE_TOOL_CACHED)
+unset(_CMAKE_TOOL_NAME)
+unset(_CMAKE_TOOL)