summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/target_link_options/LINK_OPTIONS.cmake
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2018-08-09 14:28:13 (GMT)
committerBrad King <brad.king@kitware.com>2018-08-09 16:52:44 (GMT)
commit9561d42f95b519386c5f8f84d8ae59a6b8deb429 (patch)
tree4ee5e3968534b8dd8b87ced00eaf58d6d83c0827 /Tests/RunCMake/target_link_options/LINK_OPTIONS.cmake
parent24f226e2d3ee53ea6155d3aaefd80c3b5dfe6924 (diff)
downloadCMake-9561d42f95b519386c5f8f84d8ae59a6b8deb429.zip
CMake-9561d42f95b519386c5f8f84d8ae59a6b8deb429.tar.gz
CMake-9561d42f95b519386c5f8f84d8ae59a6b8deb429.tar.bz2
target_link_options: Add test to verify static library behavior
Issue: #18251
Diffstat (limited to 'Tests/RunCMake/target_link_options/LINK_OPTIONS.cmake')
-rw-r--r--Tests/RunCMake/target_link_options/LINK_OPTIONS.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/target_link_options/LINK_OPTIONS.cmake b/Tests/RunCMake/target_link_options/LINK_OPTIONS.cmake
index f17195d..84cf129 100644
--- a/Tests/RunCMake/target_link_options/LINK_OPTIONS.cmake
+++ b/Tests/RunCMake/target_link_options/LINK_OPTIONS.cmake
@@ -22,6 +22,13 @@ add_executable(LinkOptions_consumer LinkOptionsExe.c)
target_link_libraries(LinkOptions_consumer PRIVATE LinkOptions_producer)
+# static library with generator expression
+add_library(LinkOptions_static STATIC LinkOptionsLib.c)
+target_link_options(LinkOptions_static PRIVATE $<$<CONFIG:Release>:${pre}BADFLAG_RELEASE${obj}>
+ "SHELL:" # produces no options
+ )
+
+
# shared library with generator expression
add_library(LinkOptions_shared SHARED LinkOptionsLib.c)
target_link_options(LinkOptions_shared PRIVATE $<$<CONFIG:Release>:${pre}BADFLAG_RELEASE${obj}>