summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-04-07 14:08:03 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-04-07 14:08:09 (GMT)
commit79562b03c1bc66137891242e41cfa6f277dd46dd (patch)
tree3dc874b4a3980d4b468c95b63480be4493dbd82e /Modules
parent49f4f15b8c3c08585b96358612ad7d5b86cdf129 (diff)
parent4d786dfcfa5a9391b5ec5f41dd015c9c3d52c358 (diff)
downloadCMake-79562b03c1bc66137891242e41cfa6f277dd46dd.zip
CMake-79562b03c1bc66137891242e41cfa6f277dd46dd.tar.gz
CMake-79562b03c1bc66137891242e41cfa6f277dd46dd.tar.bz2
Merge topic 'binutils-var-private'
4d786dfcfa BinUtils: Avoid clobbering a variable named without a private prefix Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5986
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeFindBinUtils.cmake20
1 files changed, 10 insertions, 10 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index e87a16b..f32266f 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(_tool IN LISTS _CMAKE_TOOL_VARS)
+ foreach(_name IN LISTS _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_${_tool}_NAMES ${_name}${_CMAKE_TOOLCHAIN_SUFFIX})
endif()
- list(PREPEND _CMAKE_${TOOL}_NAMES ${_CMAKE_TOOLCHAIN_PREFIX}${NAME})
+ list(PREPEND _CMAKE_${_tool}_NAMES ${_CMAKE_TOOLCHAIN_PREFIX}${_name})
endif()
if(NOT _CMAKE_TOOLCHAIN_SUFFIX STREQUAL "")
- list(PREPEND _CMAKE_${TOOL}_NAMES ${_CMAKE_TOOLCHAIN_PREFIX}${NAME}${_CMAKE_TOOLCHAIN_SUFFIX})
+ list(PREPEND _CMAKE_${_tool}_NAMES ${_CMAKE_TOOLCHAIN_PREFIX}${_name}${_CMAKE_TOOLCHAIN_SUFFIX})
endif()
endforeach()
- find_program(CMAKE_${TOOL} NAMES ${_CMAKE_${TOOL}_NAMES} HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+ find_program(CMAKE_${_tool} NAMES ${_CMAKE_${_tool}_NAMES} HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
endforeach()
if(NOT CMAKE_RANLIB)
@@ -154,12 +154,12 @@ if(CMAKE_PLATFORM_HAS_INSTALLNAME)
endif()
# Mark any tool cache entries as advanced.
-foreach(var IN LISTS _CMAKE_TOOL_VARS)
- get_property(_CMAKE_TOOL_CACHED CACHE CMAKE_${var} PROPERTY TYPE)
+foreach(_tool IN LISTS _CMAKE_TOOL_VARS)
+ get_property(_CMAKE_TOOL_CACHED CACHE CMAKE_${_tool} PROPERTY TYPE)
if(_CMAKE_TOOL_CACHED)
- mark_as_advanced(CMAKE_${var})
+ mark_as_advanced(CMAKE_${_tool})
endif()
- unset(_CMAKE_${var}_NAMES)
+ unset(_CMAKE_${_tool}_NAMES)
endforeach()
unset(_CMAKE_TOOL_VARS)
unset(_CMAKE_TOOL_CACHED)