summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorKyle Edwards <kyedwards@nvidia.com>2024-07-08 14:03:16 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-07-08 14:04:24 (GMT)
commite24af20340c41baefed954052a7f27a78349e6f4 (patch)
treee3ae1829558d4d252951ca20a9a88fbcf29bedb9 /Tests
parentd308437d6d01a9011e9f02856cb45a9df2dbca41 (diff)
parent2fc9e482a90b3e94424d3e07261b2f3540178c4c (diff)
downloadCMake-e24af20340c41baefed954052a7f27a78349e6f4.zip
CMake-e24af20340c41baefed954052a7f27a78349e6f4.tar.gz
CMake-e24af20340c41baefed954052a7f27a78349e6f4.tar.bz2
Merge topic 'TRANSITIVE_LINK_PROPERTIES_isnt_usage'
2fc9e482a9 Evaluation of TRANSITIVE_LINK_PROPERTIES isn't considered a usage Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9643
Diffstat (limited to 'Tests')
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt6
-rw-r--r--Tests/RunCMake/install/EXPORT-InterfaceLinkNoexist.cmake4
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake1
3 files changed, 10 insertions, 1 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index 8f83587..28118ba 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -29,6 +29,9 @@ add_library(compileOnly INTERFACE)
target_compile_definitions(compileOnly INTERFACE FROM_compileOnly)
target_link_options(compileOnly INTERFACE -fthis-flag-does-not-exist)
+add_library(noUses INTERFACE)
+target_link_libraries(noUses INTERFACE this::target_does_not_exist)
+
add_library(testLib1 STATIC testLib1.c)
add_library(testLib2 STATIC testLib2.c)
target_link_libraries(testLib2 testLib1)
@@ -601,6 +604,7 @@ install(FILES
install(
TARGETS
compileOnly
+ noUses
testExe1 testLib1 testLib2 testExe2 testLib3 testLib4 testExe3 testExe4
testExe2lib testLib4lib testLib4libdbg testLib4libopt
testLib6 testLib7 testLib8
@@ -676,7 +680,7 @@ export(TARGETS testExe1 testLib1 testLib2 testLib3
testSharedLibDepends renamed_on_export
cmp0022NEW cmp0022OLD
TopDirLib SubDirLinkA
- systemlib
+ systemlib noUses
testInterfaceIncludeUser
testInterfaceIncludeUser2
NAMESPACE bld_
diff --git a/Tests/RunCMake/install/EXPORT-InterfaceLinkNoexist.cmake b/Tests/RunCMake/install/EXPORT-InterfaceLinkNoexist.cmake
new file mode 100644
index 0000000..14442bc
--- /dev/null
+++ b/Tests/RunCMake/install/EXPORT-InterfaceLinkNoexist.cmake
@@ -0,0 +1,4 @@
+add_library(foo INTERFACE)
+target_link_libraries(foo INTERFACE nonexistent::bar)
+install(TARGETS foo DESTINATION lib EXPORT foo-targets)
+install(EXPORT foo-targets FILE foo-targets.cmake DESTINATION lib)
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index 7b0aa85..295922c 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -85,6 +85,7 @@ run_cmake(EXPORT-UnknownExport)
run_cmake(EXPORT-NamelinkOnly)
run_cmake(EXPORT-SeparateNamelink)
run_cmake(EXPORT-TargetTwice)
+run_cmake(EXPORT-InterfaceLinkNoexist)
run_cmake(CMP0062-OLD)
run_cmake(CMP0062-NEW)
run_cmake(CMP0062-WARN)