diff options
author | Brad King <brad.king@kitware.com> | 2021-05-05 14:05:55 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-05-05 14:06:03 (GMT) |
commit | 4ff6c5e34c1a8c19161725ecb525e3499aa663a3 (patch) | |
tree | 1370b18f9238c61f235358e86299a457474c8db8 /Modules | |
parent | de0c8b4d98d71280abd585e17f6bd7b20d4de959 (diff) | |
parent | c33fb2e664f81f23b3141190dd2476d6599060e6 (diff) | |
download | CMake-4ff6c5e34c1a8c19161725ecb525e3499aa663a3.zip CMake-4ff6c5e34c1a8c19161725ecb525e3499aa663a3.tar.gz CMake-4ff6c5e34c1a8c19161725ecb525e3499aa663a3.tar.bz2 |
Merge topic 'binutils-var-private'
c33fb2e664 BinUtils: Use more-private temporary variable names
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6085
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 22 |
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) |