[CMake] Generating Source Files

James Bigler jamesbigler at gmail.com
Wed Apr 8 15:46:27 EDT 2009


On Wed, Apr 8, 2009 at 1:41 PM, Jeremy Cowgar <jeremy at cowgar.com> wrote:
> Bill Hoffman wrote:
>>
>> I like this solution as well, as you don't have to be running cmake from
>> cmake.   It does mean that you have to be able to run the parser at first
>> cmake time.
>
> Ok, I have this implemented now, however, it seems that the checks for
> IS_NEWER and the execute_command does not run when you issue a normal make,
> only when you do cmake. Thus, when I change anything, I have to run cmake to
> even know if there are any changes that should cause a new build to take
> place?
>
> For instance, I can edit parser.e and do wmake (using Watcom) and nothing
> changes/compiles. It thinks everything is up to date. If I run cmake . then
> it sees parser.e has changed, regenerates source and then wmake will build a
> new binary :-(
>
> Jeremy
>

This is why you need to generate a file that is included by CMake.
This way CMake will know to reconfigure when that file changes.

James


More information about the CMake mailing list