mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-16 16:32:47 +00:00
cmake: Provide install_name_tool stub instead of disabling it
When running `enable_language()`, CMake checks the platform-specific toolchain components, which includes `install_name_tool` for macOS. We disable this check when cross-compiling on Linux because `install_name_tool` is not used and our toolchain file does not provide it. However, the current workaround has been breaking CMake's assumptions since commit eb8facd39606e9472f9ff6de40d7caf76767d0da (CMake 4.1.0, backported to 4.0.5), which causes an error during configuration using the Ninja generator. This change fixes this behaviour by providing a stub executable instead of `install_name_tool`, as we currently do in the depends build subsystem.
This commit is contained in:
parent
80dc4359b8
commit
38a7a67126
@ -77,7 +77,7 @@ if(CMAKE_VERSION VERSION_LESS 4.2 AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NO
|
||||
# - https://gitlab.kitware.com/cmake/cmake/-/issues/27069
|
||||
# - https://gitlab.kitware.com/cmake/cmake/-/merge_requests/10955
|
||||
# So disable this tool check in further enable_language() commands.
|
||||
set(CMAKE_PLATFORM_HAS_INSTALLNAME FALSE)
|
||||
set(CMAKE_INSTALL_NAME_TOOL "${CMAKE_COMMAND} -E true")
|
||||
endif()
|
||||
enable_language(CXX)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user