mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 06:09:52 -06:00
Since commit 2e1149874d (cmSystemTools: Support multiple binary formats,
2021-06-14, v3.22.0-rc1~575^2) the `file(RPATH_...)` operations fail on
files that are not ELF or XCOFF format. Previously the RPATH operations
tolerated files of unknown format if the goal was to produce a file with
an empty RPATH. Restore this tolerance in order to support setting an
empty RPATH on GNU ld scripts.
Fixes: #22963
7 lines
229 B
CMake
7 lines
229 B
CMake
set(f "${CMAKE_CURRENT_BINARY_DIR}/not_a_binary.txt")
|
|
file(WRITE "${f}" "Not a binary.\n")
|
|
file(RPATH_CHECK FILE "${f}" RPATH "")
|
|
if(NOT EXISTS "${f}")
|
|
message(FATAL_ERROR "RPATH_CHECK removed\n ${f}\nfor empty RPATH")
|
|
endif()
|