summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/target_link_libraries
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2023-07-17 21:44:26 (GMT)
committerBrad King <brad.king@kitware.com>2023-07-18 17:21:01 (GMT)
commit7351d590ee6a846ed0f2bd4793384a33bf49ea0d (patch)
tree35ade287824ea6c02e450f3e215eaa67364e8338 /Tests/RunCMake/target_link_libraries
parent83574a47726b8824d58b65a262c289573fb69bb0 (diff)
downloadCMake-7351d590ee6a846ed0f2bd4793384a33bf49ea0d.zip
CMake-7351d590ee6a846ed0f2bd4793384a33bf49ea0d.tar.gz
CMake-7351d590ee6a846ed0f2bd4793384a33bf49ea0d.tar.bz2
cmTarget: Add a way to represent imported shared library stubs
Shared library stubs can be used for linking, but not at runtime. Their role is similar to import libraries on Windows, so represent their location with the `IMPORTED_IMPLIB` target property. Fixes: #24940
Diffstat (limited to 'Tests/RunCMake/target_link_libraries')
-rw-r--r--Tests/RunCMake/target_link_libraries/ImportedTargetStub.cmake2
-rw-r--r--Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake1
2 files changed, 3 insertions, 0 deletions
diff --git a/Tests/RunCMake/target_link_libraries/ImportedTargetStub.cmake b/Tests/RunCMake/target_link_libraries/ImportedTargetStub.cmake
new file mode 100644
index 0000000..04f9cfb
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/ImportedTargetStub.cmake
@@ -0,0 +1,2 @@
+add_library(SharedStubImportedGlobal SHARED IMPORTED GLOBAL)
+set_target_properties(SharedStubImportedGlobal PROPERTIES IMPORTED_IMPLIB z)
diff --git a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
index 7c5d77d..0e3877a 100644
--- a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
@@ -23,6 +23,7 @@ run_cmake(CMP0079-link-NEW-bogus)
run_cmake(CMP0108-OLD-self-link)
run_cmake(CMP0108-NEW-self-link)
run_cmake(ImportedTarget)
+run_cmake(ImportedTargetStub)
run_cmake(ImportedTargetFailure)
run_cmake(MixedSignature)
run_cmake(Separate-PRIVATE-LINK_PRIVATE-uses)