[Cmake-commits] CMake branch, next, updated. v2.8.5-1638-gdaf795f

Alexander Neundorf neundorf at kde.org
Wed Aug 17 18:12:48 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  daf795ff1e7d44bc0ee6e896ac5395a596af4cb1 (commit)
       via  678e12448140017f7b64c6307afb53b500910f46 (commit)
      from  002cdea27f71bd21c37a8760f4c2355bb64193c3 (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=daf795ff1e7d44bc0ee6e896ac5395a596af4cb1
commit daf795ff1e7d44bc0ee6e896ac5395a596af4cb1
Merge: 002cdea 678e124
Author:     Alexander Neundorf <neundorf at kde.org>
AuthorDate: Wed Aug 17 18:12:46 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Aug 17 18:12:46 2011 -0400

    Merge topic 'AutomocForQt' into next
    
    678e124 Only enable the automoc test after checking that Qt4 works


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=678e12448140017f7b64c6307afb53b500910f46
commit 678e12448140017f7b64c6307afb53b500910f46
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Aug 18 00:16:02 2011 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Aug 18 00:16:02 2011 +0200

    Only enable the automoc test after checking that Qt4 works
    
    On some systems which contribute nightly builds there were strange
    errors which seemed to hint that the installed Qt4 is not usable/
    not usable with this compiler. So first check whether it works,
    and only if this was successful, enable the test.
    
    Alex

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 7bf4ddb..b1db40d 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -845,18 +845,37 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
   ENDIF(NOT QT4_FOUND)
 
   IF(QT4_FOUND)
-    ADD_TEST(QtAutomoc ${CMAKE_CTEST_COMMAND}
-      --build-and-test
-      "${CMake_SOURCE_DIR}/Tests/QtAutomoc"
-      "${CMake_BINARY_DIR}/Tests/QtAutomoc"
-      --build-generator ${CMAKE_TEST_GENERATOR}
-      --build-project QtAutomoc
-      --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
-      --build-exe-dir "${CMake_BINARY_DIR}/Tests/QtAutomoc"
-      --force-new-ctest-process
-      --test-command ${CMAKE_CTEST_COMMAND} -V
-      )
-    LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/QtAutomoc")
+    # test whether the Qt4 which has been found works, on some machines
+    # which run nightly builds there were errors like "wrong file format"
+    # for libQtCore.so. So first check it works, and only if it does add
+    # the automoc test.
+    INCLUDE(CheckCXXSourceCompiles)
+    SET(_save_CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES}")
+    SET(_save_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
+
+    SET(CMAKE_REQUIRED_INCLUDES ${QT_INCLUDES})
+    SET(CMAKE_REQUIRED_LIBRARIES ${QT_QTCORE_LIBRARIES})
+
+    CHECK_CXX_SOURCE_COMPILES("#include <QCoreApplication>\n int main() {return (qApp == 0 ? 0 : 1); }\n"
+                              QT4_WORKS_FOR_AUTOMOC_TEST)
+
+    SET(CMAKE_REQUIRED_INCLUDES "${_save_CMAKE_REQUIRED_INCLUDES}")
+    SET(CMAKE_REQUIRED_LIBRARIES "${_save_CMAKE_REQUIRED_LIBRARIES}")
+
+    IF(QT4_WORKS_FOR_AUTOMOC_TEST)
+      ADD_TEST(QtAutomoc ${CMAKE_CTEST_COMMAND}
+        --build-and-test
+        "${CMake_SOURCE_DIR}/Tests/QtAutomoc"
+        "${CMake_BINARY_DIR}/Tests/QtAutomoc"
+        --build-generator ${CMAKE_TEST_GENERATOR}
+        --build-project QtAutomoc
+        --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+        --build-exe-dir "${CMake_BINARY_DIR}/Tests/QtAutomoc"
+        --force-new-ctest-process
+        --test-command ${CMAKE_CTEST_COMMAND} -V
+        )
+      LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/QtAutomoc")
+    ENDIF()
   ENDIF()
 
   ADD_TEST(ExternalProject ${CMAKE_CTEST_COMMAND}

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

Summary of changes:
 Tests/CMakeLists.txt |   43 +++++++++++++++++++++++++++++++------------
 1 files changed, 31 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list