[CMake] cmake-gui's separation between configuration & generation

Robert Dailey rcdailey.lists at gmail.com
Thu Aug 23 11:48:42 EDT 2012


On Thu, Aug 23, 2012 at 10:43 AM, John Drescher <drescherjm at gmail.com> wrote:
>> Is the separation between configuration & generation really necessary
>> for cmake-gui? I ask because several of my co-workers are confused
>> between the differences in the two, even though I explain it.
>>
>> Honestly there isn't really a reason that I can think of to do a
>> configure without a generate, unless you're testing the integrity of
>> your CMake script changes maybe, but even then, if its broken
>> generation won't take place.
>>
>> The command line program does not separate the two, so I simply think
>> cmake-gui should eliminate the configure button, and simply have a
>> generate button. Does this seem fair? Is there a reason why they are
>> separated?
>
> I can think of one use case that I use that the separation is a good
> thing. What about when you have options and variables that are
> conditional depending on other CMake variables so that setting the
> variables / options may take more than 1 configure.

Well, think of this from the perspective of Linux users. They don't
get to configure seperately, so only Windows users get special
treatment here (and maybe Mac too, since it's using Qt). Basically, if
two configures are necessary, you simply just hit the "generate"
button twice, and the wait may be slightly longer because of the
generation. However, usually it's the configure step that takes 99% of
the time and generation is quick since it's just spitting out files to
disk it seems.

I would also argue that any CMake project should have appropriate
defaults OR logic to calculate the defaults for you, so that even if a
user decides to not modify any cache variables, generation should
always succeed. CMake can't assume that 2 passes will be necessary
(and it really shouldn't).


More information about the CMake mailing list