Am Mittwoch, 21. Mai 2014, 09:24:34 schrieb Clinton Stimpson: > On Wednesday, May 21, 2014 10:50:42 AM Brad King wrote: > > On 05/21/2014 09:18 AM, Stephen Kelly wrote: > > > I recall discussion about this kind of thing before, but I think > > > relating to qmake-qt4 and other versioned names. > > > > Currently qmake is preferred over qmake-qt4, but I do not know > > > > why. There is a check to avoid using qmake from Qt5 at least: > > FindQt4: Do not use qmake from Qt5, 2013-03-05 > > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21123416 > > > > Originally qmake-qt4 was preferred over qmake: > > ENH: Add support for debian having both qt3 and qt4, 2006-02-28 > > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2251970c > > (qmake-qt4 qmake) > > > > Then the order was reversed without much detail in the commit: > > ENH: -apply the patches by Clinton Stimpson, 2006-04-27 > > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f59ad1aa > > (qmake qmake-qt4) > > > > The commit message mentions porting some changes from KDE's > > module, so perhaps history is there. > > > > Later they were flipped back and forth in one day: > > ENH: Clarify a doc string. Fixes #10358, 2010-03-17 > > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd0b37ea > > (qmake-qt4 qmake) > > > > Change to use FindX11.cmake. Should fix #9929, 2010-03-17 > > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=61ad5242 > > (qmake qmake-qt4) > > > > so that was likely an accident followed by a correction. > > > > I think there was discussion too but I also do not remember when > > or where. > > I vaguely remember a discussion as well. > I think it had something to do with find_program() looping over names then > paths vs. paths then names. > > Here's a test I just did on my machine: > I have "qmake" for Qt3 in a system location, "qmake-qt4" for Qt4 in a system > location, and "qmake" for my own Qt4 build under my home directory. I then > add my own Qt4 build in CMAKE_PREFIX_PATH. > > With find_program( .. qmake qmake-qt4 ...), > I get my build of Qt4. > > With find_program( .. qmake-qt4 qmake ...), > I get the system Qt4.
I have not touched the search for qmake, since searching for qmake is already protected against wrong major versions. > Should we change FindQt4.cmake to loop over paths first, then it wouldn't > matter as much what order the names are? FindQt4 already handles the case > where the qmake for Qt3 is found first and skip over it. FindQt4 already only searches QT_BINARY_DIR for the other tools, and that is all this patch is about. IOW: I do not care much _which_ Qt version is found here, more that it finds a consistent set of tools, i.e. not using moc from Qt3 together with Qt4 or vice versa. The Qt3 module is probably weaker in this spot, but I don't expect many people having different Qt3 installations these days, so hopefully noone will notice, and the patch would not make anything worse for them. Eike
signature.asc
Description: This is a digitally signed message part.
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
