[CMake] dependlocal problem

Brad King brad.king at kitware.com
Wed Feb 23 17:54:47 EST 2005


Alexander Neundorf wrote:
> I attached a cmake.check_depends file. I think it shows the problem.  
> It contains a lot of rules like:  
>   
> /home/src/kde3-HEAD/kdevelop/lib/interfaces/KDevCoreIface.moc:  
> 	$(MAKE) $(MAKESILENT) dependlocal  
>   
> These moc-files are included in the cpp files:  
...
> #include "foo.moc"  
...
>   
> So when make enters the directory and wants to build foo.o, it sees that  
> foo.cpp depends on foo.moc, and foo.moc forces dependlocal. make  
> dependlocal takes a noticable moment to execute. foo.moc is created from  
> and depends on foo.h (as specified in the ADD_CUSTOM_COMMAND()).  
> For a directory with a lot of such moc files this adds up significantly.  
>   
> What could be done to improve this situation ?  
> Maybe not create the dependlocal for files which are generated ?  

Those rules are setup for all files included from a source file in case 
a header is removed so that make does not complain about a missing 
header it does not know how to generate.  In this case it does have a 
rule to generate it so the dependlocal rule should not be added.  Please 
submit this as a bug report.

Thanks,
-Brad


More information about the CMake mailing list