summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-04-19 14:01:10 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-05-03 15:08:07 (GMT)
commit375e6fdbbe398921de321216125765ba1917a325 (patch)
tree43d934f18f4d28a82d5264a0d0fb0301bc0bf7d9 /Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
parent24a3e5cda049138ca178216e0d7b02262e4035ed (diff)
downloadCMake-375e6fdbbe398921de321216125765ba1917a325.zip
CMake-375e6fdbbe398921de321216125765ba1917a325.tar.gz
CMake-375e6fdbbe398921de321216125765ba1917a325.tar.bz2
Link step: use linker dependency linker file
Based on work done by @ben.boeckel (!8051) Fixes: #22217
Diffstat (limited to 'Tests/RunCMake/BuildDepends/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/BuildDepends/RunCMakeTest.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
index 8099079..b527580 100644
--- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
@@ -194,3 +194,15 @@ if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 " OR
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)
+ run_BuildDepends(LinkDependsExternalLibrary)
+ unset(run_BuildDepends_skip_step_2)
+ run_BuildDepends(LinkDepends)
+ endif()
+endif()