diff options
author | Brad King <brad.king@kitware.com> | 2024-10-24 14:42:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-10-26 10:01:09 (GMT) |
commit | 92272c4a175105a59a37bde333f73171f1a4538f (patch) | |
tree | d75cb25159208f283febc3f357eff49dc8d9dd2c /Tests/RunCMake/BuildDepends | |
parent | be540dbe19caf16818f6db5bf51d7c1dd2cd1b60 (diff) | |
download | CMake-92272c4a175105a59a37bde333f73171f1a4538f.zip CMake-92272c4a175105a59a37bde333f73171f1a4538f.tar.gz CMake-92272c4a175105a59a37bde333f73171f1a4538f.tar.bz2 |
Tests/RunCMake/BuildDepends: Skip LinkDepends with broken GNU ld 2.43
Issue: #26401
Diffstat (limited to 'Tests/RunCMake/BuildDepends')
-rw-r--r-- | Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake | 9 | ||||
-rw-r--r-- | Tests/RunCMake/BuildDepends/RunCMakeTest.cmake | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake b/Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake index 596e1eb..f6d4a6c 100644 --- a/Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake +++ b/Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake @@ -1,9 +1,12 @@ enable_language(C) -file(WRITE "${CMAKE_BINARY_DIR}/LinkDependsUseLinker.cmake" - "set(CMAKE_LINK_DEPENDS_USE_LINKER ${CMAKE_LINK_DEPENDS_USE_LINKER}) -set(CMAKE_C_LINK_DEPENDS_USE_LINKER ${CMAKE_C_LINK_DEPENDS_USE_LINKER})\n") +file(WRITE "${CMAKE_BINARY_DIR}/LinkDependsUseLinker.cmake" " +set(CMAKE_LINK_DEPENDS_USE_LINKER ${CMAKE_LINK_DEPENDS_USE_LINKER}) +set(CMAKE_C_LINK_DEPENDS_USE_LINKER ${CMAKE_C_LINK_DEPENDS_USE_LINKER}) +set(CMAKE_C_COMPILER_LINKER_ID ${CMAKE_C_COMPILER_LINKER_ID}) +set(CMAKE_C_COMPILER_LINKER_VERSION ${CMAKE_C_COMPILER_LINKER_VERSION}) +") file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake" diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake index a585dce..5176f5b 100644 --- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake +++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake @@ -208,7 +208,10 @@ if (RunCMake_GENERATOR MATCHES "Make|Ninja") run_BuildDepends(LinkDependsCheck) include("${RunCMake_BINARY_DIR}/LinkDependsCheck-build/LinkDependsUseLinker.cmake") if ((NOT DEFINED CMAKE_LINK_DEPENDS_USE_LINKER OR CMAKE_LINK_DEPENDS_USE_LINKER) - AND CMAKE_C_LINK_DEPENDS_USE_LINKER) + AND CMAKE_C_LINK_DEPENDS_USE_LINKER + # FIXME(#26401): GNU binutils 2.43 broke dependency-file generation. + AND NOT (CMAKE_C_COMPILER_LINKER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_LINKER_VERSION VERSION_GREATER_EQUAL "2.43") + ) run_BuildDepends(LinkDependsExternalLibrary) unset(run_BuildDepends_skip_step_2) run_BuildDepends(LinkDepends -DMAKE_SUPPORTS_SPACES=${MAKE_SUPPORTS_SPACES}) |