[CMake] bug in new makefile generator

Brad King brad.king at kitware.com
Fri Mar 18 19:23:39 EST 2005


Alexander Neundorf wrote:
> I have some custom rules named like  
> "#include\ "kdevdesignerintegration.moc", so the new makefile generator 
> generates a Makefile which tries to include  
> "include CMakeCustomRules.dir/#include\ 
> "kdevdesignerintegration.moc.make" 
>  
> which fails because the "#" starts a comment for the Makefile so it tries 
> to include the subdir "CMakeCustomRules.dir" which doesn't work. 
> I'll change my custom rule, but I think it can be considered a bug in the 
> generator. 

This did not work in the old generator.  Creating custom make targets 
with "#" in the name looks dangerous.  Each make program will want its 
own kind of escaping.  It could probably be done but might cause 
trouble.  I think the best way to resolve this issue is to make 
ADD_CUSTOM_COMMAND and ADD_CUSTOM_TARGET give an error if the output has 
a "#" in its name.

-Brad


More information about the CMake mailing list