[Cmake-commits] CMake branch, next, updated. v2.8.10.2-2983-gbfc9dea

Stephen Kelly steveire at gmail.com
Wed May 15 13:25:39 EDT 2013


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  bfc9deae93a58e82ceb92706b1428a7f85fd1165 (commit)
       via  5c0f2a131f358ac11da52a919f637b57d34cc544 (commit)
      from  143def6e9a77c4854e19870b513e0f473b514647 (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=bfc9deae93a58e82ceb92706b1428a7f85fd1165
commit bfc9deae93a58e82ceb92706b1428a7f85fd1165
Merge: 143def6 5c0f2a1
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed May 15 13:25:34 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 15 13:25:34 2013 -0400

    Merge topic 'test-moc-with-empty-COMPILE_DEFINITIONS' into next
    
    5c0f2a1 Test the use of target transitive compile definitions with moc.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5c0f2a131f358ac11da52a919f637b57d34cc544
commit 5c0f2a131f358ac11da52a919f637b57d34cc544
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed May 15 19:17:41 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed May 15 19:24:18 2013 +0200

    Test the use of target transitive compile definitions with moc.

diff --git a/Tests/QtAutomoc/CMakeLists.txt b/Tests/QtAutomoc/CMakeLists.txt
index 49d433f..a18baef 100644
--- a/Tests/QtAutomoc/CMakeLists.txt
+++ b/Tests/QtAutomoc/CMakeLists.txt
@@ -5,6 +5,9 @@ project(QtAutomoc)
 if (QT_TEST_VERSION STREQUAL 4)
   find_package(Qt4 REQUIRED)
 
+  # Include this directory before using the UseQt4 file.
+  add_subdirectory(defines_test)
+
   include(UseQt4)
 
   set(QT_QTCORE_TARGET Qt4::QtCore)
diff --git a/Tests/QtAutomoc/defines_test/CMakeLists.txt b/Tests/QtAutomoc/defines_test/CMakeLists.txt
new file mode 100644
index 0000000..ad4e684
--- /dev/null
+++ b/Tests/QtAutomoc/defines_test/CMakeLists.txt
@@ -0,0 +1,6 @@
+
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+add_executable(defines_test defines_test.cpp)
+set_target_properties(defines_test PROPERTIES AUTOMOC TRUE)
+target_link_libraries(defines_test Qt4::QtGui)
diff --git a/Tests/QtAutomoc/defines_test/defines_test.cpp b/Tests/QtAutomoc/defines_test/defines_test.cpp
new file mode 100644
index 0000000..2836d35
--- /dev/null
+++ b/Tests/QtAutomoc/defines_test/defines_test.cpp
@@ -0,0 +1,38 @@
+
+#include <QObject>
+
+#ifdef QT_GUI_LIB
+#include <QTextDocument>
+
+class SomeDocument : public QTextDocument
+{
+  Q_OBJECT
+
+Q_SIGNALS:
+  void someSig();
+};
+#endif
+
+#ifdef QT_CORE_LIB
+class SomeObject : public QObject
+{
+  Q_OBJECT
+
+Q_SIGNALS:
+  void someSig();
+};
+#endif
+
+int main(int argc, char **argv)
+{
+#ifdef QT_CORE_LIB
+  QMetaObject sosmo = SomeObject::staticMetaObject;
+#endif
+#ifdef QT_GUI_LIB
+  QMetaObject sdsmo = SomeDocument::staticMetaObject;
+#endif
+
+  return 0;
+}
+
+#include "defines_test.moc"

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

Summary of changes:
 Tests/QtAutomoc/CMakeLists.txt                |    3 ++
 Tests/QtAutomoc/defines_test/CMakeLists.txt   |    6 ++++
 Tests/QtAutomoc/defines_test/defines_test.cpp |   38 +++++++++++++++++++++++++
 3 files changed, 47 insertions(+), 0 deletions(-)
 create mode 100644 Tests/QtAutomoc/defines_test/CMakeLists.txt
 create mode 100644 Tests/QtAutomoc/defines_test/defines_test.cpp


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list