If you can modify the subdirectory cmakefiles then maybe you could protect the declaration of the uninstall target like this:<br><br>if (NOT TARGET uninstall)<br> add_custom_target(uninstall ...)<br>endif()<br><br>That way if the top level cmakefile declares an uninstall target it should prevent the subdirectory versions from being declared.<br>
<br>--<br>Glenn<br><br><br><div class="gmail_quote">On 4 July 2011 17:33, Joe H <span dir="ltr"><<a href="mailto:expipiplus1@gmail.com" target="_blank">expipiplus1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi all!<div><br></div><div>I have a project, which pulls in a bunch of sub-projects, using add_subdirectory.</div><div><br></div><div>The problem is that these projects all create a custom target called uninstall. Obviously, when these projects are pulled together, the uninstall targets clash.</div>
<div>An ideal solution would be to ignore the uninstall targets in the subdirectories, and just pay attention to the one at the root. Is this at all possible?</div><div><br></div><div>Thanks!</div>
<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>