[CMake] Generating Source Files

Jeremy Cowgar jeremy at cowgar.com
Wed Apr 8 11:53:01 EDT 2009


James Bigler wrote:
> By including progname.mak during configure, you tell CMake to
> reconfigure whenever that file changes.  If a user changes parser.e,
> you will generate all your sources, plus the source list.  Running
> cmake again will cause you to reconfigure.
>   

I was hoping to not have to run cmake all the time. I don't want to have 
to worry if I edit parser.e, and it ads a new .c file to build, if I am 
compiling that new file or not. 1/2 the time I'll never know if parser.e 
was updated in such a way.

I'm beginning to think that CMake just isn't up to the task and maybe we 
should stick with our three makefiles :-/ With the makefiles, we have a 
dependency on the .e files, if they change, then we launch $(MAKE) 
generate ... Then when we go to build our project, we do $(MAKE) compile 
... This allows us to easily include the .mak file the generator 
creates. the first time around it's empty, but it doesn't matter because 
when the actual sources are compiled, make is launched, the Makefile is 
parsed again and this time (because it's after generation) the .mak file 
has content and everything is built automatically. All we do currently 
is "make" and everything is handled for us. It's just getting burdensome 
maintaining three makefiles.

Jeremy



More information about the CMake mailing list