[CMake] Having one custom target depend on another.

Moreland, Kenneth kmorel at sandia.gov
Mon Dec 5 13:11:58 EST 2005


Thanks Alex.  That workaround works for me.

However, this still seems like a bug.  Should I add it to the bug tracker?

-Ken 

> -----Original Message-----
> From: Alexander Neundorf [mailto:a.neundorf-work at gmx.net] 
> Sent: Saturday, December 03, 2005 8:16 AM
> To: Moreland, Kenneth
> Cc: cmake at cmake.org
> Subject: Re: [CMake] Having one custom target depend on another.
> 
> > Von: "Moreland, Kenneth" <kmorel at sandia.gov>
> >  
> > With CMake 2.2 I'm having trouble making one custom target 
> depend on 
> > another.  Here is a small CMakeLists.txt file that demonstrates the 
> > problem.
> >  
> >     PROJECT(TEST NONE) 
> >     ADD_CUSTOM_TARGET(hello) 
> >     ADD_CUSTOM_TARGET(world DEPENDS hello)
> >  
> > CMake generates build make files for this just fine.  If you type 
> > "make hello", it works as expected.  If you type "make world" (with 
> > the GNU version of make) you get the following error:
> >  
> >     make[3]: *** No rule to make target `hello', needed by `world'. 
> > Stop. 
> >     make[2]: *** [CMakeFiles/world.dir/all] Error 2 
> >     make[1]: *** [CMakeFiles/world.dir/rule] Error 2 
> >     make: *** [world] Error 2
> >  
> > This looks like a bug to me.  Is it?  Is there a workaround? 
>  
> Try ADD_DEPENDENCIES(world hello) instead of the "DEPENDS" parameter. 
>  
> Bye
> Alex 
>  
> 
> -- 
> Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat,
> DSL-Flatrate für nur 4,99 Euro/Monat*  http://www.gmx.net/de/go/dsl
> 
> 



More information about the CMake mailing list