[CMake] Adding install dependency to test-target?
Aaron Turner
synfinatic at gmail.com
Thu Jan 29 11:55:22 EST 2009
On Thu, Jan 29, 2009 at 7:43 AM, Hugo Heden <hugoheden at gmail.com> wrote:
> 2008/11/20 Eric Noulard <eric.noulard at gmail.com>:
>> 2008/11/20 Hugo Heden <heden at 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
More information about the CMake
mailing list