On Thu, Jan 29, 2009 at 7:43 AM, Hugo Heden <hugohe...@gmail.com> wrote: > 2008/11/20 Eric Noulard <eric.noul...@gmail.com>: >> 2008/11/20 Hugo Heden <he...@foi.se>: >>> Good day all, >>> >>> >>> Is there any way that I can add 'install' dependency to the 'test'-target? >>> >>> Doing >>> >>> add_dependencies( test install ) >>> >>> does not seem to work: >>> CMake Error at ... (ADD_DEPENDENCIES): >>> add_dependencies Adding dependency to non-existent target: test >> >> I don't think it's possible to add dependencies to "built-in" CMake target >> (which deserve a feature request :-) >> >>> Apparently neither 'test' nor 'install' counts as "top-level-targets"? >> >> Precisely :=) >> > > Feature request added: http://public.kitware.com/Bug/view.php?id=8438
Sorry to hijack the thread, but I believe I'm having the same issue with the target "clean": ADD_CUSTOM_TARGET(clean_libopts COMMAND ${MAKE} clean WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/libopts) ADD_DEPENDENCIES(clean clean_libopts) results in: CMake Error at CMakeLists.txt:245 (ADD_DEPENDENCIES): add_dependencies Adding dependency to non-existent target: clean I'm doing the above because libopts is not built via cmake, but via autotools. -- Aaron Turner http://synfin.net/ http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake