diff options
author | Brad King <brad.king@kitware.com> | 2021-08-10 13:22:37 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-08-10 13:22:52 (GMT) |
commit | 25b6cf4f3529953f3e838f68be8b5be858545aad (patch) | |
tree | fe8c1f85ceed6a73f16e45148e5598babadddc28 /Modules | |
parent | 438005a6e0a4a9c82b06395d1dc4792f24cb8c32 (diff) | |
parent | fc1f733cc7b312cd156b4d2aa6e8190e7def33b9 (diff) | |
download | CMake-25b6cf4f3529953f3e838f68be8b5be858545aad.zip CMake-25b6cf4f3529953f3e838f68be8b5be858545aad.tar.gz CMake-25b6cf4f3529953f3e838f68be8b5be858545aad.tar.bz2 |
Merge topic 'binutils-no-cmake-paths'
fc1f733cc7 BinUtils: Avoid searching CMAKE_PREFIX_PATH
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6434
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 6 | ||||
-rw-r--r-- | Modules/Compiler/Clang-FindBinUtils.cmake | 2 | ||||
-rw-r--r-- | Modules/Compiler/GNU-FindBinUtils.cmake | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index f139ff4..d0beac6 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -33,7 +33,7 @@ function(__resolve_tool_path CMAKE_TOOL SEARCH_PATH DOCSTRING) if(NOT _CMAKE_USER_TOOL_PATH) # Find CMAKE_TOOL in the SEARCH_PATH directory by user-defined name. - find_program(_CMAKE_TOOL_WITH_PATH NAMES ${${CMAKE_TOOL}} HINTS ${SEARCH_PATH}) + find_program(_CMAKE_TOOL_WITH_PATH NAMES ${${CMAKE_TOOL}} HINTS ${SEARCH_PATH} NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH) if(_CMAKE_TOOL_WITH_PATH) # Overwrite CMAKE_TOOL with full path found in SEARCH_PATH. @@ -202,7 +202,7 @@ foreach(_CMAKE_TOOL IN LISTS _CMAKE_TOOL_VARS) endforeach() list(REMOVE_DUPLICATES _CMAKE_${_CMAKE_TOOL}_FIND_NAMES) - find_program(CMAKE_${_CMAKE_TOOL} NAMES ${_CMAKE_${_CMAKE_TOOL}_FIND_NAMES} HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + find_program(CMAKE_${_CMAKE_TOOL} NAMES ${_CMAKE_${_CMAKE_TOOL}_FIND_NAMES} HINTS ${_CMAKE_TOOLCHAIN_LOCATION} NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH) unset(_CMAKE_${_CMAKE_TOOL}_FIND_NAMES) endforeach() @@ -212,7 +212,7 @@ endif() if(CMAKE_PLATFORM_HAS_INSTALLNAME) - find_program(CMAKE_INSTALL_NAME_TOOL NAMES ${_CMAKE_TOOLCHAIN_PREFIX}install_name_tool HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + find_program(CMAKE_INSTALL_NAME_TOOL NAMES ${_CMAKE_TOOLCHAIN_PREFIX}install_name_tool HINTS ${_CMAKE_TOOLCHAIN_LOCATION} NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH) if(NOT CMAKE_INSTALL_NAME_TOOL) message(FATAL_ERROR "Could not find install_name_tool, please check your installation.") diff --git a/Modules/Compiler/Clang-FindBinUtils.cmake b/Modules/Compiler/Clang-FindBinUtils.cmake index e6c469a..125ae78 100644 --- a/Modules/Compiler/Clang-FindBinUtils.cmake +++ b/Modules/Compiler/Clang-FindBinUtils.cmake @@ -28,6 +28,7 @@ find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR NAMES "${_CMAKE_TOOLCHAIN_PREFIX}llvm-ar-${__version_x}" "${_CMAKE_TOOLCHAIN_PREFIX}llvm-ar" HINTS ${__clang_hints} + NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH DOC "LLVM archiver" ) mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR) @@ -38,6 +39,7 @@ find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES "${_CMAKE_TOOLCHAIN_PREFIX}llvm-ranlib-${__version_x}" "${_CMAKE_TOOLCHAIN_PREFIX}llvm-ranlib" HINTS ${__clang_hints} + NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH DOC "Generate index for LLVM archive" ) mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB) diff --git a/Modules/Compiler/GNU-FindBinUtils.cmake b/Modules/Compiler/GNU-FindBinUtils.cmake index 097fbf3..4dcdd53 100644 --- a/Modules/Compiler/GNU-FindBinUtils.cmake +++ b/Modules/Compiler/GNU-FindBinUtils.cmake @@ -20,6 +20,7 @@ find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR NAMES "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x}" "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar${_CMAKE_COMPILER_SUFFIX}" HINTS ${__gcc_hints} + NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH DOC "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" ) mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR) @@ -30,6 +31,7 @@ find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x}" "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib${_CMAKE_COMPILER_SUFFIX}" HINTS ${__gcc_hints} + NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH DOC "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" ) mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB) |