diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-04-19 16:01:10 +0200 |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-05-03 17:08:07 +0200 |
commit | 375e6fdbbe398921de321216125765ba1917a325 (patch) | |
tree | 43d934f18f4d28a82d5264a0d0fb0301bc0bf7d9 /Tests/RunCMake/BuildDepends/LinkDependsExternalLibrary.cmake | |
parent | 24a3e5cda049138ca178216e0d7b02262e4035ed (diff) | |
download | cmake-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.cmake | 13 |
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 +") |