[cmake-developers] Make sure we always find the FindQt4.cmake shipped with CMake itself

Brad King brad.king at kitware.com
Thu May 16 14:57:11 EDT 2013


Steve,

On 05/15/2013 11:19 AM, Stephen Kelly wrote:
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72bd2064748428ae66599fed76ac5921d42c95df
> commit 72bd2064748428ae66599fed76ac5921d42c95df
> Author:     Stephen Kelly <steveire at gmail.com>
> AuthorDate: Wed May 15 17:02:06 2013 +0200
> Commit:     Stephen Kelly <steveire at gmail.com>
> CommitDate: Wed May 15 17:19:10 2013 +0200
> 
>     Make sure we always find the FindQt4.cmake shipped with CMake itself.
> 
> diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
> index e07bb69..7de3005 100644
> --- a/Tests/CMakeLists.txt
> +++ b/Tests/CMakeLists.txt
> @@ -263,7 +263,7 @@ if(BUILD_TESTING)
>    list(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX})
>  
>    if(NOT QT4_FOUND)
> -    find_package(Qt4)
> +    find_package(Qt4 QUIET PATHS "${CMAKE_SOURCE_DIR}/Modules" NO_DEFAULT_PATH)
>    endif()

This change disabled all Qt tests on the dashboard last night.
CDash reports "-3" on the number of tests for all machines with Qt.

The PATHS option to find_package works only for finding package
configuration files, not find-modules.  Therefore this no longer
finds Qt4 at all.  Also it is not safe to use FindQt4.cmake from
the current CMake when running with an older CMake because it
may use features that didn't exist in the older one.

Currently these topics are open on the stage relating to Qt4/5:

* workaround-usr-move-qt5: I think this can be reverted.
  It never fixed the problem on Marcus' machine fully and
  I think he upgraded Qt to make the problem go away.

* fix-build-without-qt4-with-qt5: Introduces this problem

* Automoc-Qt4-Qt5, test-moc-with-empty-COMPILE_DEFINITIONS:
  Not tested anymore due to this problem.

Please clean all this up.

Thanks,
-Brad



More information about the cmake-developers mailing list