summaryrefslogtreecommitdiff
path: root/Modules/CMakeFindBinUtils.cmake
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:46 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:46 +0900
commitd8d99d7e7a4052f3fa2132d17074cc65ad8bb5a6 (patch)
tree3b73a04e64392300d9670f222fb550669ddad69c /Modules/CMakeFindBinUtils.cmake
parent99a800848c2512f7c93504fc7b28e6182a6ceb93 (diff)
downloadcmake-d8d99d7e7a4052f3fa2132d17074cc65ad8bb5a6.tar.gz
cmake-d8d99d7e7a4052f3fa2132d17074cc65ad8bb5a6.tar.bz2
cmake-d8d99d7e7a4052f3fa2132d17074cc65ad8bb5a6.zip
Imported Upstream version 3.20.1upstream/3.20.1
Diffstat (limited to 'Modules/CMakeFindBinUtils.cmake')
-rw-r--r--Modules/CMakeFindBinUtils.cmake22
1 files changed, 12 insertions, 10 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index ff178f647..f32266f51 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -99,6 +99,8 @@ else()
set(_CMAKE_LINKER_NAMES "ld.lld")
endif()
list(APPEND _CMAKE_AR_NAMES "llvm-ar")
+ list(APPEND _CMAKE_RANLIB_NAMES "llvm-ranlib")
+ list(APPEND _CMAKE_STRIP_NAMES "llvm-strip")
list(APPEND _CMAKE_NM_NAMES "llvm-nm")
list(APPEND _CMAKE_OBJDUMP_NAMES "llvm-objdump")
list(APPEND _CMAKE_OBJCOPY_NAMES "llvm-objcopy")
@@ -121,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)
@@ -152,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)