[CMake] Having one custom target depend on another.
Alexander Neundorf
a.neundorf-work at gmx.net
Sat Dec 3 10:15:53 EST 2005
> 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