[CMake] Make test an official dependency...

Philip Lowman philip at yhbt.com
Thu Oct 22 17:38:18 EDT 2009


Are you looking for something like this...?

if(TARGET foo)
   add_test(footest foo)
endif()

On Wed, Oct 21, 2009 at 2:33 PM, Theodore Papadopoulo <
Theodore.Papadopoulo at sophia.inria.fr> wrote:

> From the documentation of add_dependencies:
>
> Make a top-level target depend on other top-level targets. A top-level
> target is one created by ADD_EXECUTABLE, ADD_LIBRARY, or ADD_CUSTOM_TARGET.
> A test is thus not a valid target to add dependencies to.
>
> Often, one wants to build an executable only for the purpose of a test.
> Excluding the executable
> from the all target is easy. However,  there seems to be  currently no way
> of indicating that a test
> depends on an executable. Would it be possible to add some target name to
> tests ??
>
> If not, would it be at least possible to make "test" (and for what is worth
> "all") some valid targets to
> which dependencies can be added ??
>
> Thank's for any hint.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091022/8bd54c8d/attachment.htm>


More information about the CMake mailing list