[CMake] automagically generated header hell

David Somers dsomers at omz13.com
Fri Jun 30 12:26:24 EDT 2006


On Friday 30 June 2006 17:41, you wrote:
> Why would make do that?  Are you changing the generated .h files each run?

Dammit! I was accidentally changing a file... doing cp instead of cp -p. 
Grrrr.

> >Is there some way to 'persuade' cmake that in my library when foo.c does
> >#include <bar.h> that it shouldn't add <bar.h> into the dependencies
> > (because I've manually taken care of that elsewhere)?
>
> I am not sure I understand why you would want to do this.  If the .h file
> has changed, you should rebuild any .c file that includes it.   You might
> be able to use INCLUDE_REGULAR_EXPRESSION to make cmake skip some files.

I had a situation where a tool would always regenerate a h file... I fudge the 
issue now by caching the file and only replace it if diff says the file 
really is different (opposed to just being newer).

BTW, one hiccup I still have is this: for the COMMENT, how can I get it to 
print out the $ character?

Thanks,

David Somers
typographer/programmer/whatever


More information about the CMake mailing list