diff options
author | Deniz Bahadir <dbahadir@benocs.com> | 2020-11-30 23:25:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-12-01 12:35:17 (GMT) |
commit | 38bcb5c0a3accd2dd29fb7632c6b3bf31b990d82 (patch) | |
tree | f7d364b671663d4da35cbb17131e58a84a7c54f1 /Tests | |
parent | 5ef23640535dfd6543bd81c86282e38122169af6 (diff) | |
download | CMake-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')
-rw-r--r-- | Tests/RunCMake/export/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/export/SeparateNamelinkExport.cmake | 16 | ||||
-rw-r--r-- | Tests/RunCMake/install/EXPORT-SeparateNamelink.cmake | 19 | ||||
-rw-r--r-- | Tests/RunCMake/install/RunCMakeTest.cmake | 1 |
4 files changed, 37 insertions, 0 deletions
diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake index 95c8d5c..0e6020f 100644 --- a/Tests/RunCMake/export/RunCMakeTest.cmake +++ b/Tests/RunCMake/export/RunCMakeTest.cmake @@ -17,3 +17,4 @@ run_cmake(DependOnNotExport) run_cmake(DependOnDoubleExport) run_cmake(UnknownExport) run_cmake(NamelinkOnlyExport) +run_cmake(SeparateNamelinkExport) diff --git a/Tests/RunCMake/export/SeparateNamelinkExport.cmake b/Tests/RunCMake/export/SeparateNamelinkExport.cmake new file mode 100644 index 0000000..b006aea --- /dev/null +++ b/Tests/RunCMake/export/SeparateNamelinkExport.cmake @@ -0,0 +1,16 @@ +enable_language(CXX) +add_library(foo SHARED empty.cpp) +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 +) +export(EXPORT fooExport FILE "${CMAKE_CURRENT_BINARY_DIR}/foo.cmake") 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) |