[Cmake-commits] CMake branch, next, updated. v2.8.6-1577-g735ecd9

Stephen Kelly steveire at gmail.com
Fri Oct 14 02:50:36 EDT 2011


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  735ecd93351f9a3fbea7eb6884e264256b98af8e (commit)
       via  85ed3d74fadbc86581ab232f3e888ff47770740a (commit)
      from  280a27891bddf2d9c8446d6a124dfd5c42fce037 (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=735ecd93351f9a3fbea7eb6884e264256b98af8e
commit 735ecd93351f9a3fbea7eb6884e264256b98af8e
Merge: 280a278 85ed3d7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 14 02:50:22 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Oct 14 02:50:22 2011 -0400

    Merge topic 'cmake-link-interface-libraries' into next
    
    85ed3d7 Add a control point to the unit test.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85ed3d74fadbc86581ab232f3e888ff47770740a
commit 85ed3d74fadbc86581ab232f3e888ff47770740a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 13 22:42:01 2011 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Oct 13 22:42:01 2011 +0200

    Add a control point to the unit test.
    
    We only test on platforms where LINK_INTERFACE_LIBRARIES works.

diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
index 69a94bd..534cc38 100644
--- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
@@ -13,6 +13,16 @@ add_executable(
   "${CMAKE_CURRENT_BINARY_DIR}/main.cxx"
 )
 
+try_compile(LINK_INTERFACE_LIBRARIES_FAILS
+  "${CMAKE_CURRENT_BINARY_DIR}/control_point"
+  "${CMAKE_CURRENT_SOURCE_DIR}/control_point"
+  control_point
+)
+
+if (LINK_INTERFACE_LIBRARIES_FAILS)
+  return()
+endif()
+
 set(Bools True False)
 
 foreach(B1 ${Bools})
diff --git a/Tests/CMakeCommands/target_link_libraries/control_point/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/control_point/CMakeLists.txt
new file mode 100644
index 0000000..e41c3f1
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/control_point/CMakeLists.txt
@@ -0,0 +1,24 @@
+cmake_minimum_required(VERSION 2.8)
+
+project(src)
+
+include(CheckCXXCompilerFlag)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+set(CMAKE_VERBOSE_MAKEFILE ON)
+
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
+
+add_subdirectory(lib)
+
+include_directories(
+  "${CMAKE_CURRENT_SOURCE_DIR}/lib"
+  "${CMAKE_CURRENT_BINARY_DIR}/lib"
+)
+
+
+add_executable(exec
+  "main.cpp"
+)
+
+target_link_libraries(exec libB )
diff --git a/Tests/CMakeCommands/target_link_libraries/control_point/lib/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/control_point/lib/CMakeLists.txt
new file mode 100644
index 0000000..c0d1353
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/control_point/lib/CMakeLists.txt
@@ -0,0 +1,22 @@
+cmake_minimum_required(VERSION 2.8)
+
+project(libs)
+
+include(CheckCXXCompilerFlag)
+include(GenerateExportHeader)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+set(CMAKE_VERBOSE_MAKEFILE ON)
+
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
+
+add_library(libA SHARED classA.cpp)
+add_library(libB SHARED classB.cpp)
+
+generate_export_header(libA)
+generate_export_header(libB)
+
+target_link_libraries(libB libA)
+
+target_link_libraries(libA LINK_INTERFACE_LIBRARIES "")
+target_link_libraries(libB LINK_INTERFACE_LIBRARIES "")
diff --git a/Tests/CMakeCommands/target_link_libraries/control_point/lib/classA.cpp b/Tests/CMakeCommands/target_link_libraries/control_point/lib/classA.cpp
new file mode 100644
index 0000000..f5e7106
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/control_point/lib/classA.cpp
@@ -0,0 +1,7 @@
+
+#include "classA.h"
+
+classA::classA()
+{
+
+}
diff --git a/Tests/CMakeCommands/target_link_libraries/control_point/lib/classA.h b/Tests/CMakeCommands/target_link_libraries/control_point/lib/classA.h
new file mode 100644
index 0000000..4d568e3
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/control_point/lib/classA.h
@@ -0,0 +1,13 @@
+
+#ifndef CLASS_A_H
+#define CLASS_A_H
+
+#include "liba_export.h"
+
+class LIBA_EXPORT classA
+{
+public:
+  classA();
+};
+
+#endif
diff --git a/Tests/CMakeCommands/target_link_libraries/control_point/lib/classB.cpp b/Tests/CMakeCommands/target_link_libraries/control_point/lib/classB.cpp
new file mode 100644
index 0000000..e309586
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/control_point/lib/classB.cpp
@@ -0,0 +1,13 @@
+
+#include "classB.h"
+
+#include "classA.h"
+
+classB::classB()
+{
+}
+
+classA* classB::a() const
+{
+  return new classA();
+}
diff --git a/Tests/CMakeCommands/target_link_libraries/control_point/lib/classB.h b/Tests/CMakeCommands/target_link_libraries/control_point/lib/classB.h
new file mode 100644
index 0000000..e0baed6
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/control_point/lib/classB.h
@@ -0,0 +1,17 @@
+
+#ifndef CLASS_B_H
+#define CLASS_B_H
+
+#include "libb_export.h"
+
+class classA;
+
+class LIBB_EXPORT classB
+{
+public:
+  classB();
+
+  classA* a() const;
+};
+
+#endif
diff --git a/Tests/CMakeCommands/target_link_libraries/control_point/main.cpp b/Tests/CMakeCommands/target_link_libraries/control_point/main.cpp
new file mode 100644
index 0000000..e5472cf
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/control_point/main.cpp
@@ -0,0 +1,10 @@
+#include "classB.h"
+#include "classA.h"
+
+int main(int, char **) {
+
+  classB classB_;
+  classA classA_;
+
+  return 0;
+}

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

Summary of changes:
 .../target_link_libraries/CMakeLists.txt           |   10 ++++++++
 .../control_point/CMakeLists.txt                   |   24 ++++++++++++++++++++
 .../control_point/lib/CMakeLists.txt               |   22 ++++++++++++++++++
 .../{libs => control_point/lib}/classA.cpp         |    0
 .../{libs => control_point/lib}/classA.h           |    0
 .../{libs => control_point/lib}/classB.cpp         |    0
 .../{libs => control_point/lib}/classB.h           |    0
 .../target_link_libraries/control_point/main.cpp   |   10 ++++++++
 8 files changed, 66 insertions(+), 0 deletions(-)
 create mode 100644 Tests/CMakeCommands/target_link_libraries/control_point/CMakeLists.txt
 create mode 100644 Tests/CMakeCommands/target_link_libraries/control_point/lib/CMakeLists.txt
 copy Tests/CMakeCommands/target_link_libraries/{libs => control_point/lib}/classA.cpp (100%)
 copy Tests/CMakeCommands/target_link_libraries/{libs => control_point/lib}/classA.h (100%)
 copy Tests/CMakeCommands/target_link_libraries/{libs => control_point/lib}/classB.cpp (100%)
 copy Tests/CMakeCommands/target_link_libraries/{libs => control_point/lib}/classB.h (100%)
 create mode 100644 Tests/CMakeCommands/target_link_libraries/control_point/main.cpp


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list