summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-03-16 14:52:18 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-03-16 17:57:01 (GMT)
commite7813b15a63a4ff5150d22b01ef47b51b22045e5 (patch)
tree4fcfa972f2295cc680430cd2093864eac5dc1303 /Tests/CMakeLists.txt
parent27fb96b9783ba13ce4c8bd681b73c6f3a892d90c (diff)
downloadCMake-e7813b15a63a4ff5150d22b01ef47b51b22045e5.zip
CMake-e7813b15a63a4ff5150d22b01ef47b51b22045e5.tar.gz
CMake-e7813b15a63a4ff5150d22b01ef47b51b22045e5.tar.bz2
Add a test for Qt5Automoc
The same source is used as for the Qt4Automoc test.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt25
1 files changed, 20 insertions, 5 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index e07bb69..c548869 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1003,19 +1003,34 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/QtAutomocNoQt")
+ find_package(Qt5Widgets QUIET NO_MODULE)
+ if(Qt5Widgets_FOUND)
+ add_test(Qt5Automoc ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/QtAutomoc"
+ "${CMake_BINARY_DIR}/Tests/Qt5Automoc"
+ ${build_generator_args}
+ --build-project QtAutomoc
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5Automoc"
+ --force-new-ctest-process
+ --build-options -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=5
+ --test-command ${CMAKE_CTEST_COMMAND} -V
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5Automoc")
+ endif()
if(QT4_WORKS AND QT_QTGUI_FOUND)
- add_test(QtAutomoc ${CMAKE_CTEST_COMMAND}
+ add_test(Qt4Automoc ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/QtAutomoc"
- "${CMake_BINARY_DIR}/Tests/QtAutomoc"
+ "${CMake_BINARY_DIR}/Tests/Qt4Automoc"
${build_generator_args}
--build-project QtAutomoc
- --build-exe-dir "${CMake_BINARY_DIR}/Tests/QtAutomoc"
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4Automoc"
--force-new-ctest-process
- --build-options -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
+ --build-options -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=4
--test-command ${CMAKE_CTEST_COMMAND} -V
)
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/QtAutomoc")
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Automoc")
endif()
if(QT4_WORKS AND QT_QTGUI_FOUND)
add_test(Qt4Targets ${CMAKE_CTEST_COMMAND}