summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.cmake
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-04-19 16:01:10 +0200
committerMarc Chevrier <marc.chevrier@gmail.com>2023-05-03 17:08:07 +0200
commit375e6fdbbe398921de321216125765ba1917a325 (patch)
tree43d934f18f4d28a82d5264a0d0fb0301bc0bf7d9 /Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.cmake
parent24a3e5cda049138ca178216e0d7b02262e4035ed (diff)
downloadcmake-375e6fdbbe398921de321216125765ba1917a325.tar.gz
Link step: use linker dependency linker file
Based on work done by @ben.boeckel (!8051) Fixes: #22217
Diffstat (limited to 'Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.cmake')
-rw-r--r--Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.cmake b/Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.cmake
new file mode 100644
index 0000000000..fe6575c9b8
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.cmake
@@ -0,0 +1,13 @@
+
+enable_language(C)
+
+add_library(External SHARED "${CMAKE_CURRENT_BINARY_DIR}/external.c")
+
+file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/ExternalLibrary-$<LOWER_CASE:$<CONFIG>>.cmake"
+ CONTENT "set(EXTERNAL_LIBRARY \"$<TARGET_LINKER_FILE:External>\")\n")
+
+
+file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake"
+ CONTENT "
+# no required actions
+")