[CMake] dependlocal problem

William A. Hoffman billlist at nycap.rr.com
Wed Feb 23 20:16:46 EST 2005


You might be able to get around this with
 INCLUDE_REGULAR_EXPRESSION, if you set it to
a regex that includes everything but .moc then
cmake depend won't depend on the .moc file and the
problem should go away.

-Bill

At 05:54 PM 2/23/2005, Brad King wrote:
>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
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list