[CMake] Auto re-configuring until cache stops changing

Michael Wild themiwi at gmail.com
Mon Sep 6 00:37:47 EDT 2010


On 5. Sep, 2010, at 20:30 , David Doria wrote:

> Lately I've been making a class full of students use CMake. Without
> exception, I've had to explain why you have to configure twice to
> build VTK. I imagine they are a representative sample of the "Level 0"
> CMake user - they just want the project they are trying to build "to
> work" with default options, etc.
> 
> (The explanation is here:
> http://www.cmake.org/cmake/help/runningcmake.html
> under "Why do I have to edit the cache more than once for some projects?"
> if anyone reading this is wondering)
> 
> Since CMake knows if the cache has changed (it doesn't let you
> generate if it has), when why can't there be a button called "Setup
> project with default options" or "Really configure + generate" that
> configures as many times as  necessary and generates all in one step?
> I bet this button would get the most clicks by the general population.
> 
> Just a suggestion - any thoughts?
> 
> Thanks,
> 
> David

Tell your students to run 'cmake' from the command line (the only sane way of running CMake) and you get the desired behavior. No need to spoil your students with GUIs and such trivia! ;-)

But honestly, I always wondered at this strangeness, too. Why not configure until CMake can generate? I mean, it still could remember which new cache variables became available and highlight them for the user, but things would be much more intuitive.

Michael

--
There is always a well-known solution to every human problem -- neat, plausible, and wrong.
H. L. Mencken

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100906/7ad2ff59/attachment.pgp>


More information about the CMake mailing list