[cmake-developers] Usage of Qt4 for Tests
Clinton Stimpson
clinton at elemtech.com
Wed Feb 29 09:53:38 EST 2012
On Wednesday, February 29, 2012 02:23:47 am Rolf Eike Beer wrote:
> The tests using Qt4 on my machine are failing:
>
> http://open.cdash.org/testDetails.php?test=136849123&build=2048757
> http://open.cdash.org/testDetails.php?test=136849126&build=2048757
>
> This is because this machine only has QtCore installed, but nothing else.
> I think something like this should be done to only run the tests if all of
> the Qt4 dependencies are found:
>
> diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
> index e1dbfe2..bf9bce3 100644
> --- a/Tests/CMakeLists.txt
> +++ b/Tests/CMakeLists.txt
> @@ -274,7 +274,7 @@ IF(BUILD_TESTING)
>
> # 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)
> + if(QT4_WORKS AND QT_QTGUI_FOUND AND QT_QTSQL_FOUND)
> ADD_TEST(Qt4Deploy ${CMAKE_CTEST_COMMAND}
> --build-and-test
> "${CMake_SOURCE_DIR}/Tests/Qt4Deploy"
> @@ -912,7 +912,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P
> ${CMake_SOURCE_DIR}/Utilities/
> )
> LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Environment")
>
> - IF(QT4_WORKS)
> + IF(QT4_WORKS AND QT_QTGUI_FOUND)
> ADD_TEST(QtAutomoc ${CMAKE_CTEST_COMMAND}
> --build-and-test
> "${CMake_SOURCE_DIR}/Tests/QtAutomoc"
>
> Opinions?
>
The Qt4Deploy test can have its QtGui dependency easily removed. I can take
care of that one.
The part of your patch for QtAutomoc looks good.
--
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com
More information about the cmake-developers
mailing list