summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-06-23 12:36:55 (GMT)
committerBrad King <brad.king@kitware.com>2023-06-23 14:35:04 (GMT)
commit5945a98ced2e1f4794f26f39256c95d875220408 (patch)
tree1b114fde8fdc509ae02a7390e6fca8acf85b2066 /Tests
parent99ea9ad947e980d179a618ff1f67fa27a30975d3 (diff)
downloadCMake-5945a98ced2e1f4794f26f39256c95d875220408.zip
CMake-5945a98ced2e1f4794f26f39256c95d875220408.tar.gz
CMake-5945a98ced2e1f4794f26f39256c95d875220408.tar.bz2
link dependencies: deactivate the feature
Unfortunately it breaks in combination with LTO due to a bug in the GNU linker. Fixes: #25014
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake3
-rw-r--r--Tests/RunCMake/BuildDepends/RunCMakeTest.cmake4
2 files changed, 4 insertions, 3 deletions
diff --git a/Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake b/Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake
index a21096b..596e1eb 100644
--- a/Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake
+++ b/Tests/RunCMake/BuildDepends/LinkDependsCheck.cmake
@@ -2,7 +2,8 @@
enable_language(C)
file(WRITE "${CMAKE_BINARY_DIR}/LinkDependsUseLinker.cmake"
- "set(CMAKE_C_LINK_DEPENDS_USE_LINKER \"${CMAKE_C_LINK_DEPENDS_USE_LINKER}\")\n")
+ "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(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 dfa4f49..fada37a 100644
--- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
@@ -199,12 +199,12 @@ endif()
run_BuildDepends(CustomCommandUnityBuild)
unset(run_BuildDepends_skip_step_2)
-#if (RunCMake_GENERATOR MATCHES "Make|Ninja" AND CMAKE_C_LINK_DEPENDS_USE_LINKER)
if (RunCMake_GENERATOR MATCHES "Make|Ninja")
set(run_BuildDepends_skip_step_2 1)
run_BuildDepends(LinkDependsCheck)
include("${RunCMake_BINARY_DIR}/LinkDependsCheck-build/LinkDependsUseLinker.cmake")
- if (CMAKE_C_LINK_DEPENDS_USE_LINKER)
+ if ((NOT DEFINED CMAKE_LINK_DEPENDS_USE_LINKER OR CMAKE_LINK_DEPENDS_USE_LINKER)
+ AND CMAKE_C_LINK_DEPENDS_USE_LINKER)
run_BuildDepends(LinkDependsExternalLibrary)
unset(run_BuildDepends_skip_step_2)
run_BuildDepends(LinkDepends)