summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/install
diff options
context:
space:
mode:
authorDeniz Bahadir <dbahadir@benocs.com>2020-11-30 23:25:39 (GMT)
committerBrad King <brad.king@kitware.com>2020-12-01 12:35:17 (GMT)
commit38bcb5c0a3accd2dd29fb7632c6b3bf31b990d82 (patch)
treef7d364b671663d4da35cbb17131e58a84a7c54f1 /Tests/RunCMake/install
parent5ef23640535dfd6543bd81c86282e38122169af6 (diff)
downloadCMake-38bcb5c0a3accd2dd29fb7632c6b3bf31b990d82.zip
CMake-38bcb5c0a3accd2dd29fb7632c6b3bf31b990d82.tar.gz
CMake-38bcb5c0a3accd2dd29fb7632c6b3bf31b990d82.tar.bz2
export: Do not fail generation for separate namelink only case
Update the change from commit 64690f6df0 (export: Do not fail generation for namelink-only case, 2020-10-09, v3.19.0-rc1~7^2) to also handle separate namelink-only and namelink-skip calls. Fixes: #21529
Diffstat (limited to 'Tests/RunCMake/install')
-rw-r--r--Tests/RunCMake/install/EXPORT-SeparateNamelink.cmake19
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake1
2 files changed, 20 insertions, 0 deletions
diff --git a/Tests/RunCMake/install/EXPORT-SeparateNamelink.cmake b/Tests/RunCMake/install/EXPORT-SeparateNamelink.cmake
new file mode 100644
index 0000000..5c6fa10
--- /dev/null
+++ b/Tests/RunCMake/install/EXPORT-SeparateNamelink.cmake
@@ -0,0 +1,19 @@
+enable_language(C)
+add_library(foo SHARED empty.c)
+install(TARGETS foo EXPORT fooExport
+ RUNTIME DESTINATION bin
+ LIBRARY
+ DESTINATION lib
+ COMPONENT runtime
+ NAMELINK_SKIP
+)
+install(TARGETS foo EXPORT fooExport
+ LIBRARY
+ DESTINATION lib
+ COMPONENT development
+ NAMELINK_ONLY
+)
+install(EXPORT fooExport
+ DESTINATION "lib/cmake/"
+ FILE "foo.cmake"
+)
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index 5aab88c..d64d88b 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -78,6 +78,7 @@ run_cmake(TARGETS-DESTINATION-bad)
run_cmake(EXPORT-OldIFace)
run_cmake(EXPORT-UnknownExport)
run_cmake(EXPORT-NamelinkOnly)
+run_cmake(EXPORT-SeparateNamelink)
run_cmake(CMP0062-OLD)
run_cmake(CMP0062-NEW)
run_cmake(CMP0062-WARN)