[CMake] Having one custom target depend on another.
Moreland, Kenneth
kmorel at sandia.gov
Fri Dec 2 17:27:31 EST 2005
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?
-Ken
**** Kenneth Moreland
*** Sandia National Laboratories
***********
*** *** *** email: kmorel at sandia.gov
** *** ** phone: (505) 844-8919
*** fax: (505) 845-0833
More information about the CMake
mailing list