CMake/Tests/RunCMake/LinkLibrariesStrategy/Inspect.cmake
Marc Chevrier 0445190d2f LLD linker: avoid regression on archive libraries deduplication
Due to a bug on LLD linker for ELF binaries, deduplication should
occur only if CMP0156 and CMP0179 are NEW.

Fixes: #26447
2024-11-18 21:02:50 +01:00

15 lines
310 B
CMake

enable_language(C)
set(info "")
foreach(var
CMAKE_C_LINK_LIBRARIES_PROCESSING
CMAKE_C_PLATFORM_LINKER_ID
CMAKE_EXECUTABLE_FORMAT
)
if(DEFINED ${var})
string(APPEND info "set(${var} \"${${var}}\")\n")
endif()
endforeach()
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/info.cmake" "${info}")