summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeCommands/target_link_options
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2018-09-14 16:10:58 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2018-09-14 16:10:58 (GMT)
commit6da8b67c3f9c07352fa36e717e79e15ef36495f3 (patch)
tree39a27099e098c5576d0a9de4492dc1d30131dc1b /Tests/CMakeCommands/target_link_options
parentf0c84346ed25f6b8ce3a9f79aece87a58c8a4748 (diff)
downloadCMake-6da8b67c3f9c07352fa36e717e79e15ef36495f3.zip
CMake-6da8b67c3f9c07352fa36e717e79e15ef36495f3.tar.gz
CMake-6da8b67c3f9c07352fa36e717e79e15ef36495f3.tar.bz2
target_link_options: fix erroneous handling of BEFORE keyword.
Diffstat (limited to 'Tests/CMakeCommands/target_link_options')
-rw-r--r--Tests/CMakeCommands/target_link_options/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/CMakeCommands/target_link_options/CMakeLists.txt b/Tests/CMakeCommands/target_link_options/CMakeLists.txt
index 3bb6ff3..e84d041 100644
--- a/Tests/CMakeCommands/target_link_options/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_options/CMakeLists.txt
@@ -24,3 +24,11 @@ get_target_property(result target_link_options_3 INTERFACE_LINK_OPTIONS)
if (NOT result MATCHES "-INTERFACE_FLAG")
message(SEND_ERROR "target_link_options not populated the INTERFACE_LINK_OPTIONS target property of static library")
endif()
+
+add_library(target_link_options_4 SHARED EXCLUDE_FROM_ALL LinkOptionsLib.c)
+target_link_options(target_link_options_4 PRIVATE -PRIVATE_FLAG)
+target_link_options(target_link_options_4 BEFORE PRIVATE -BEFORE_PRIVATE_FLAG)
+get_target_property(result target_link_options_4 LINK_OPTIONS)
+if (NOT result MATCHES "-BEFORE_PRIVATE_FLAG.*-PRIVATE_FLAG")
+ message(SEND_ERROR "target_link_options not managing correctly 'BEFORE' keyword")
+endif()