[CMake] Suggesting to FindQT4.cmake where to find QT4
Jed Brown
jed at 59A2.org
Mon May 25 17:39:49 EDT 2009
Bill Hoffman wrote:
> You can also set QMake on the cmake command line as well:
>
> cmake -DQT_QMAKE_EXECUTABLE=/path/to/qmake ../source
Yeah, I'm much less concerned with this particular case as with the
philosophy that the correct way to select installations is by modifying
PATH. Frustratingly, a new user will fire up cmake and get the wrong
version (they're not even aware of exactly what the dependencies are,
let alone the naming convention for the cache variable that will get the
correct version). So they interactively change a couple paths and
reconfigure. Lo and behold, they now have an inconsistent state because
the cache wasn't flushed when they changed QT_QMAKE_EXECUTABLE (I don't
know if this is the case with Qt, but is is with most packages).
So they (hopefully) conclude that the cache is hopelessly inconsistent
and run rm -rf * in the build directory, then rerun cmake with
command-line flags (waiting for interactive mode is too late) for all
the packages that were found incorrectly. If they're lucky, they read
the docs for every package that was found incorrectly and used the
correct flags, otherwise rinse and repeat.
Using PATH and falling back on peculiarly named variables (hopefully
only one non-advanced variable per package, so that it's unambiguous)
would be a total non-issue if changing it actually flushed all the
dependent variables. It's the need to manually flush the cache that
makes this a nightmare for users with slightly odd organization (which
they might not be in control of).
Jed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090525/386832ee/attachment.pgp>
More information about the CMake
mailing list