[Cmake-commits] CMake branch, master, updated. v3.12.1-429-g43027ce

Kitware Robot kwrobot at kitware.com
Fri Aug 17 20:35:06 EDT 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  43027ce56dfc8b11519a4ef1a11f5543d8568e03 (commit)
       via  174721ecc04036f5a68982a451a96e47f9ac0c8f (commit)
      from  786af7a7116ff4c7703f9dc3b6eaee1d8099ad2b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=43027ce56dfc8b11519a4ef1a11f5543d8568e03
commit 43027ce56dfc8b11519a4ef1a11f5543d8568e03
Merge: 786af7a 174721e
Author:     Craig Scott <craig.scott at crascit.com>
AuthorDate: Sat Aug 18 00:25:01 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Aug 17 20:25:15 2018 -0400

    Merge topic 'link-options'
    
    174721ecc0 LINK_OPTIONS property: add test for static library.
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2284


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=174721ecc04036f5a68982a451a96e47f9ac0c8f
commit 174721ecc04036f5a68982a451a96e47f9ac0c8f
Author:     Marc Chevrier <marc.chevrier at gmail.com>
AuthorDate: Sat Aug 11 12:57:42 2018 +0200
Commit:     Marc Chevrier <marc.chevrier at gmail.com>
CommitDate: Wed Aug 15 14:40:36 2018 +0200

    LINK_OPTIONS property: add test for static library.
    
    Check that property INTERFACE_LINK_OPTIONS is correctly propagated
    from static libraries.
    
    Issue: #18251

diff --git a/Tests/CMakeCommands/target_link_options/CMakeLists.txt b/Tests/CMakeCommands/target_link_options/CMakeLists.txt
index c66cd37..3bb6ff3 100644
--- a/Tests/CMakeCommands/target_link_options/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_options/CMakeLists.txt
@@ -15,5 +15,12 @@ if (NOT result MATCHES "-PRIVATE_FLAG")
 endif()
 get_target_property(result target_link_options_2 INTERFACE_LINK_OPTIONS)
 if (NOT result MATCHES "-INTERFACE_FLAG")
-  message(SEND_ERROR "target_link_options not populated the INTERFACE_LINK_OPTIONS target property")
+  message(SEND_ERROR "target_link_options not populated the INTERFACE_LINK_OPTIONS target property of shared library")
+endif()
+
+add_library(target_link_options_3 STATIC EXCLUDE_FROM_ALL LinkOptionsLib.c)
+target_link_options(target_link_options_3 INTERFACE -INTERFACE_FLAG)
+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()
diff --git a/Tests/RunCMake/target_link_options/LINK_OPTIONS-interface-static-check.cmake b/Tests/RunCMake/target_link_options/LINK_OPTIONS-interface-static-check.cmake
new file mode 100644
index 0000000..6c5ffdb
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/LINK_OPTIONS-interface-static-check.cmake
@@ -0,0 +1,4 @@
+
+if (NOT actual_stdout MATCHES "BADFLAG_INTERFACE")
+  set (RunCMake_TEST_FAILED "Not found expected 'BADFLAG_INTERFACE'.")
+endif()
diff --git a/Tests/RunCMake/target_link_options/LINK_OPTIONS-interface-static-result.txt b/Tests/RunCMake/target_link_options/LINK_OPTIONS-interface-static-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/LINK_OPTIONS-interface-static-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/LINK_OPTIONS.cmake b/Tests/RunCMake/target_link_options/LINK_OPTIONS.cmake
index 84cf129..bb04841 100644
--- a/Tests/RunCMake/target_link_options/LINK_OPTIONS.cmake
+++ b/Tests/RunCMake/target_link_options/LINK_OPTIONS.cmake
@@ -22,6 +22,15 @@ add_executable(LinkOptions_consumer LinkOptionsExe.c)
 target_link_libraries(LinkOptions_consumer PRIVATE LinkOptions_producer)
 
 
+# static library with INTERFACE_LINK_OPTIONS
+add_library(LinkOptions_producer_static STATIC LinkOptionsLib.c)
+target_link_options(LinkOptions_producer_static
+  INTERFACE ${pre}BADFLAG_INTERFACE${obj})
+
+add_executable(LinkOptions_consumer_static LinkOptionsExe.c)
+target_link_libraries(LinkOptions_consumer_static PRIVATE LinkOptions_producer_static)
+
+
 # static library with generator expression
 add_library(LinkOptions_static STATIC LinkOptionsLib.c)
 target_link_options(LinkOptions_static PRIVATE $<$<CONFIG:Release>:${pre}BADFLAG_RELEASE${obj}>
diff --git a/Tests/RunCMake/target_link_options/RunCMakeTest.cmake b/Tests/RunCMake/target_link_options/RunCMakeTest.cmake
index 39f580f..1eaa5d2 100644
--- a/Tests/RunCMake/target_link_options/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_link_options/RunCMakeTest.cmake
@@ -21,6 +21,7 @@ if (NOT CMAKE_C_COMPILER_ID STREQUAL "Intel")
 
   run_cmake_target(LINK_OPTIONS basic LinkOptions)
   run_cmake_target(LINK_OPTIONS interface LinkOptions_consumer)
+  run_cmake_target(LINK_OPTIONS interface-static LinkOptions_consumer_static)
   run_cmake_target(LINK_OPTIONS static LinkOptions_static --config Release)
   run_cmake_target(LINK_OPTIONS shared LinkOptions_shared --config Release)
   run_cmake_target(LINK_OPTIONS mod LinkOptions_mod --config Release)

-----------------------------------------------------------------------

Summary of changes:
 Tests/CMakeCommands/target_link_options/CMakeLists.txt           | 9 ++++++++-
 ...ace-check.cmake => LINK_OPTIONS-interface-static-check.cmake} | 0
 ...hared-result.txt => LINK_OPTIONS-interface-static-result.txt} | 0
 Tests/RunCMake/target_link_options/LINK_OPTIONS.cmake            | 9 +++++++++
 Tests/RunCMake/target_link_options/RunCMakeTest.cmake            | 1 +
 5 files changed, 18 insertions(+), 1 deletion(-)
 copy Tests/RunCMake/target_link_options/{LINK_OPTIONS-interface-check.cmake => LINK_OPTIONS-interface-static-check.cmake} (100%)
 copy Tests/RunCMake/target_link_options/{LINK_OPTIONS-shared-result.txt => LINK_OPTIONS-interface-static-result.txt} (100%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list