RE: [CMake] yet another one: what does "Custom command... was not used" mean ?

Alexander Neundorf a.neundorf-work at gmx.net
Fri Jul 1 10:50:21 EDT 2005


> An: "Ken Martin" <ken.martin at kitware.com>  
> Betreff: RE: [CMake] yet another one: what does "Custom command... was  
> not	used" mean ?  
> Datum: Fri, 1 Jul 2005 16:18:39 +0200 (MEST)  
>   
... 
> > This was a new feature added at someone's request. Basically they   
> > requested that CMake report any custom commands that were defined but   
> > whose output is   
> > never used in a target. You should look at those warnings to see why   
> > the custom commands are there and what target you think would be  
> > using them.    
> >    
> > Ken   
>    
> Ah, ok.   
> The generated moc file is included in one of the source files. Since   
> cmake doesn't "see" this, it complains about it.   
> I have the same effect for an external library which is created and   
> linked to directly via a customized CMAKE_CXX_LINK_EXECUTABLE, so here   
> cmake also doesn't know that it's used.   
> Can I switch this warning off ?   
  
I think I added all files about which cmake now complains as unused  
manually as dependency to the files which use them.  
I.e.   
I did SET_FILE_PROPERTY(foo.cpp PROPERTY OBJECT_DEPENDS "foo.moc") etc.,  
so that cmake knows that foo.cpp depends on foo.moc. Nevertheless foo.moc  
doesn't appear explicitely in the sources. So I guess also checking the  
dependencies would be another idea.  
  
Bye  
Alex  
  

-- 
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl


More information about the CMake mailing list