summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-03-06 20:25:02 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-03-06 20:25:02 (GMT)
commitb22f2f18c1d195972c2ae1ae68fc06c06acc02db (patch)
tree03ab8e19340aa03b90a373f50d4eeafcb78bd073 /Tests/CMakeLists.txt
parent480ba6434399052553b31c97e399b44a1491aac9 (diff)
parent4689eedcc0a1cd73a95dbce583c9470319312b80 (diff)
downloadCMake-b22f2f18c1d195972c2ae1ae68fc06c06acc02db.zip
CMake-b22f2f18c1d195972c2ae1ae68fc06c06acc02db.tar.gz
CMake-b22f2f18c1d195972c2ae1ae68fc06c06acc02db.tar.bz2
Merge topic 'qt4-deploy'
4689eed reflect that the QtAutomoc depends on QtGui ab9661c Remove QtGui dependency in Qt4Deploy test and verify QtSql existance. 52e8279 Fix for Qt4Deploy on some test machines. 672e3bb Add test for DeployQt4.cmake 4853e1e Fix plugin installation issues. 35cbf23 Ensure libs are passed to BundleUtilities. 0ac1535 Fix bad plugin paths. a2123e8 Fix mismatched arguments. fc6f340 Don't use QT_LIBRARIES_PLUGINS by default.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt92
1 files changed, 55 insertions, 37 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 00cac94..53c59cc 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -233,12 +233,35 @@ IF(BUILD_TESTING)
LIST(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX})
+ IF(NOT QT4_FOUND)
+ FIND_PACKAGE(Qt4)
+ ENDIF(NOT QT4_FOUND)
+
+ IF(QT4_FOUND)
+ # 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)
+
+ SET(CMAKE_REQUIRED_INCLUDES "${_save_CMAKE_REQUIRED_INCLUDES}")
+ SET(CMAKE_REQUIRED_LIBRARIES "${_save_CMAKE_REQUIRED_LIBRARIES}")
+ ENDIF()
# run test for BundleUtilities on supported platforms/compilers
if(MSVC OR
CMAKE_SYSTEM_NAME MATCHES "Linux" OR
CMAKE_SYSTEM_NAME MATCHES "Darwin")
if(NOT "${CMAKE_TEST_GENERATOR}" STREQUAL "Watcom WMake")
+
ADD_TEST(BundleUtilities ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/BundleUtilities"
@@ -248,6 +271,24 @@ IF(BUILD_TESTING)
--build-project BundleUtilities
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleUtilities")
+
+ # run test for DeployQt4 on supported platforms/compilers (which depends on BundleUtilities)
+ # this test also depends on the existence of the standard qtiff plugin
+ if(QT4_WORKS AND QT_QTSQL_FOUND)
+ ADD_TEST(Qt4Deploy ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/Qt4Deploy"
+ "${CMake_BINARY_DIR}/Tests/Qt4Deploy"
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-project Qt4Deploy
+ --build-options
+ -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+ -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
+ )
+ LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Deploy")
+ endif()
+
endif()
endif()
@@ -861,43 +902,20 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Environment")
- IF(NOT QT4_FOUND)
- FIND_PACKAGE(Qt4)
- ENDIF(NOT QT4_FOUND)
-
- IF(QT4_FOUND)
- # 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
- --build-options -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
- --test-command ${CMAKE_CTEST_COMMAND} -V
- )
- LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/QtAutomoc")
- ENDIF()
+ IF(QT4_WORKS AND QT_QTGUI_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
+ --build-options -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
+ --test-command ${CMAKE_CTEST_COMMAND} -V
+ )
+ LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/QtAutomoc")
ENDIF()
ADD_TEST(ExternalProject ${CMAKE_CTEST_COMMAND}