summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-05-21 19:12:35 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-05-21 19:12:35 (GMT)
commit80f30aa6bf76c795631f576a25295f59b077afef (patch)
tree5dccd5029da4cea9a5a0e941187fd6cdbcbba976 /Tests/CMakeLists.txt
parentf206cce2cac8b018d94b2c4f39b35c6928d38bd3 (diff)
parent6489015c75367493c9ea6a7bea69b67a88972651 (diff)
downloadCMake-80f30aa6bf76c795631f576a25295f59b077afef.zip
CMake-80f30aa6bf76c795631f576a25295f59b077afef.tar.gz
CMake-80f30aa6bf76c795631f576a25295f59b077afef.tar.bz2
Merge topic 'Automoc-Qt4-Qt5'
6489015 Remove an endif() followed by an if() for the same condition. e7813b1 Add a test for Qt5Automoc 27fb96b Make the QtAutomoc test compile with either Qt 4 or Qt 5
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt26
1 files changed, 20 insertions, 6 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 2649886..332d02d 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1003,21 +1003,35 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/QtAutomocNoQt")
- if(QT4_WORKS AND QT_QTGUI_FOUND)
- add_test(QtAutomoc ${CMAKE_CTEST_COMMAND}
+ 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/QtAutomoc"
+ "${CMake_BINARY_DIR}/Tests/Qt5Automoc"
${build_generator_args}
--build-project QtAutomoc
- --build-exe-dir "${CMake_BINARY_DIR}/Tests/QtAutomoc"
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5Automoc"
--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=5
--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/Qt5Automoc")
endif()
if(QT4_WORKS AND QT_QTGUI_FOUND)
+ add_test(Qt4Automoc ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/QtAutomoc"
+ "${CMake_BINARY_DIR}/Tests/Qt4Automoc"
+ ${build_generator_args}
+ --build-project QtAutomoc
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4Automoc"
+ --force-new-ctest-process
+ --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/Qt4Automoc")
+
add_test(Qt4Targets ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/Qt4Targets"