summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-28 19:23:09 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-10-28 19:23:09 (GMT)
commitfcbe435c235f4fe1e5444a796f085c7a796be88e (patch)
tree00e4f9eff8f5dc77251c61edbd8a81dbdefb48ad /Tests/CMakeLists.txt
parent16df2456a440d87fb3e8e53fb59a2817b288b9af (diff)
parent9c87d9cc3e7a046f79ff62eda81203ef424e4a14 (diff)
downloadCMake-fcbe435c235f4fe1e5444a796f085c7a796be88e.zip
CMake-fcbe435c235f4fe1e5444a796f085c7a796be88e.tar.gz
CMake-fcbe435c235f4fe1e5444a796f085c7a796be88e.tar.bz2
Merge topic 'Qt-auto-generators'
9c87d9c Add automatic rcc invocation for Qt. 84218e1 Add automatic uic invocation for Qt. 94a0ca6 Record which files are skipped by automoc. 18fb758 Run the main executable created in the autogen tests. e485ba1 Rename the QtAutomoc tests to QtAutogen. 7ce65c3 Add extra checks for the AUTOMOC target property. 32771fc Update output messages for generic use. f371ab5 Rename RunAutomoc to RunAutogen. 85b3d6e Extract an SetupAutoMocTarget method. ca124a1 Rename the AutomocInfo.cmake file to be more generic. a342c9f Move some makefile definitions up away from moc-specific code. 98632ef Add the AUTOGEN_TARGETS_FOLDER and obsolete AUTOMOC_TARGETS_FOLDER. 63378ba Rename some variables to reflect broader scope. 97f1aa3 Rename method to reflect generic use. 4abb111 Rename local variable to reflect generic use. 03878c9 Move variable set to where it is used. ...
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt37
1 files changed, 23 insertions, 14 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 5ffd9d7..4b08c88 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1029,34 +1029,43 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/QtAutomocNoQt")
+ # On Windows there is no RPATH, so while Qt might be available for building,
+ # the required dlls may not be in the PATH, so we can't run the executables
+ # on that platform.
+ if(WIN32)
+ set(run_autogen_test ${CMAKE_CTEST_COMMAND} -V)
+ else()
+ set(run_autogen_test QtAutogen)
+ endif()
+
find_package(Qt5Widgets QUIET NO_MODULE)
if(Qt5Widgets_FOUND)
- add_test(Qt5Automoc ${CMAKE_CTEST_COMMAND}
+ add_test(Qt5Autogen ${CMAKE_CTEST_COMMAND}
--build-and-test
- "${CMake_SOURCE_DIR}/Tests/QtAutomoc"
- "${CMake_BINARY_DIR}/Tests/Qt5Automoc"
+ "${CMake_SOURCE_DIR}/Tests/QtAutogen"
+ "${CMake_BINARY_DIR}/Tests/Qt5Autogen"
${build_generator_args}
- --build-project QtAutomoc
- --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5Automoc"
+ --build-project QtAutogen
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5Autogen"
--force-new-ctest-process
--build-options -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=5
- --test-command ${CMAKE_CTEST_COMMAND} -V
+ --test-command ${run_autogen_test}
)
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5Automoc")
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5Autogen")
endif()
if(QT4_WORKS AND QT_QTGUI_FOUND)
- add_test(Qt4Automoc ${CMAKE_CTEST_COMMAND}
+ add_test(Qt4Autogen ${CMAKE_CTEST_COMMAND}
--build-and-test
- "${CMake_SOURCE_DIR}/Tests/QtAutomoc"
- "${CMake_BINARY_DIR}/Tests/Qt4Automoc"
+ "${CMake_SOURCE_DIR}/Tests/QtAutogen"
+ "${CMake_BINARY_DIR}/Tests/Qt4Autogen"
${build_generator_args}
- --build-project QtAutomoc
- --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4Automoc"
+ --build-project QtAutogen
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4Autogen"
--force-new-ctest-process
--build-options -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=4
- --test-command ${CMAKE_CTEST_COMMAND} -V
+ --test-command ${run_autogen_test}
)
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Automoc")
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Autogen")
add_test(Qt4Targets ${CMAKE_CTEST_COMMAND}
--build-and-test