Are you looking for something like this...?<br><br>if(TARGET foo)<br> add_test(footest foo)<br>endif()<br><br><div class="gmail_quote">On Wed, Oct 21, 2009 at 2:33 PM, Theodore Papadopoulo <span dir="ltr"><<a href="mailto:Theodore.Papadopoulo@sophia.inria.fr">Theodore.Papadopoulo@sophia.inria.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">From the documentation of add_dependencies:<br>
<br>
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.<br>
A test is thus not a valid target to add dependencies to.<br>
<br>
Often, one wants to build an executable only for the purpose of a test. Excluding the executable<br>
from the all target is easy. However, there seems to be currently no way of indicating that a test<br>
depends on an executable. Would it be possible to add some target name to tests ??<br>
<br>
If not, would it be at least possible to make "test" (and for what is worth "all") some valid targets to<br>
which dependencies can be added ??<br>
<br>
Thank's for any hint.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Philip Lowman<br>