[Cmake-commits] CMake branch, next, updated. v3.0.0-4288-gf63c00f

Brad King brad.king at kitware.com
Wed Jul 16 13:27:10 EDT 2014


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, next has been updated
       via  f63c00f8b5257c41f3369cebf79a3217de3141d0 (commit)
       via  3b5f2b5dfbf9231922f8939339b6f78ed227ef9c (commit)
      from  bc237a1a2acace345b93ef313767e81e92461d2e (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f63c00f8b5257c41f3369cebf79a3217de3141d0
commit f63c00f8b5257c41f3369cebf79a3217de3141d0
Merge: bc237a1 3b5f2b5
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jul 16 13:27:09 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jul 16 13:27:09 2014 -0400

    Merge topic 'generalize-LINK_ONLY' into next
    
    3b5f2b5d Tests: Teach CompatibleInterface to cover suppression with LINK_ONLY


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b5f2b5dfbf9231922f8939339b6f78ed227ef9c
commit 3b5f2b5dfbf9231922f8939339b6f78ed227ef9c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jul 16 13:20:51 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jul 16 13:26:46 2014 -0400

    Tests: Teach CompatibleInterface to cover suppression with LINK_ONLY

diff --git a/Tests/CompatibleInterface/CMakeLists.txt b/Tests/CompatibleInterface/CMakeLists.txt
index 350b518..668a97b 100644
--- a/Tests/CompatibleInterface/CMakeLists.txt
+++ b/Tests/CompatibleInterface/CMakeLists.txt
@@ -1,5 +1,5 @@
 
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.0)
 
 project(CompatibleInterface)
 
@@ -54,6 +54,15 @@ set_property(TARGET iface1 PROPERTY INTERFACE_NUMBER_MAX_PROP2 200)
 add_executable(CompatibleInterface main.cpp)
 target_link_libraries(CompatibleInterface iface1)
 
+add_library(foo STATIC foo.cpp)
+add_library(bar SHARED bar.cpp)
+set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SOMEPROP)
+set_property(TARGET foo PROPERTY INTERFACE_SOMEPROP ON)
+# Use LINK_ONLY to suppress usage requirements and allow the check to pass.
+set_property(TARGET bar PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:foo>)
+set_property(TARGET CompatibleInterface PROPERTY SOMEPROP OFF)
+target_link_libraries(CompatibleInterface bar)
+
 set_property(TARGET CompatibleInterface PROPERTY BOOL_PROP2 ON)
 set_property(TARGET CompatibleInterface PROPERTY BOOL_PROP3 ON)
 set_property(TARGET CompatibleInterface PROPERTY STRING_PROP2 prop2)
diff --git a/Tests/CompatibleInterface/bar.cpp b/Tests/CompatibleInterface/bar.cpp
new file mode 100644
index 0000000..2e09900
--- /dev/null
+++ b/Tests/CompatibleInterface/bar.cpp
@@ -0,0 +1,7 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+int bar()
+{
+  return 0;
+}
diff --git a/Tests/CompatibleInterface/foo.cpp b/Tests/CompatibleInterface/foo.cpp
new file mode 100644
index 0000000..e05eb7e
--- /dev/null
+++ b/Tests/CompatibleInterface/foo.cpp
@@ -0,0 +1,4 @@
+int foo()
+{
+  return 0;
+}
diff --git a/Tests/CompatibleInterface/main.cpp b/Tests/CompatibleInterface/main.cpp
index e23625a..d20b64b 100644
--- a/Tests/CompatibleInterface/main.cpp
+++ b/Tests/CompatibleInterface/main.cpp
@@ -40,8 +40,14 @@ enum {
 
 #include "iface2.h"
 
+int foo();
+#ifdef _WIN32
+__declspec(dllimport)
+#endif
+int bar();
+
 int main(int argc, char **argv)
 {
   Iface2 if2;
-  return if2.foo();
+  return if2.foo() + foo() + bar();
 }

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

Summary of changes:
 Tests/CompatibleInterface/CMakeLists.txt                    |   11 ++++++++++-
 .../CMP0026/empty.cpp => CompatibleInterface/bar.cpp}       |    2 +-
 .../DummyCXXFile.cxx => Tests/CompatibleInterface/foo.cpp   |    2 +-
 Tests/CompatibleInterface/main.cpp                          |    8 +++++++-
 4 files changed, 19 insertions(+), 4 deletions(-)
 copy Tests/{RunCMake/CMP0026/empty.cpp => CompatibleInterface/bar.cpp} (83%)
 copy Modules/DummyCXXFile.cxx => Tests/CompatibleInterface/foo.cpp (59%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list