I add the custom targets as a dependency with add_dependencies(), and I create the targets with add_custom_target(), I don't specify "ALL".<div><br></div><div>In my test with Visual Studio 2008, building the parent project results in these custom targets being built as well. According to your instruction, this should not happen, correct?<div>
<br><div class="gmail_quote">On Wed, Apr 4, 2012 at 12:10 PM, David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sure, just use add_custom_target without the "ALL" argument. If you<br>
don't use "ALL", then the project is completely disconnected from<br>
ALL_BUILD and everything else, and will only be triggered when you<br>
explicitly build that target/project.<br>
<br>
<br>
HTH,<br>
David<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Wed, Apr 4, 2012 at 12:53 PM, Robert Dailey <<a href="mailto:rcdailey.lists@gmail.com">rcdailey.lists@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I have a custom target that just runs some commands that have nothing to do<br>
> with building source. For convenience, when generating visual studio<br>
> projects, I'd like for that target to be included in the SLN generated by<br>
> project() but I don't want to make it a dependency, since that would force<br>
> it to build when I build any other project in the solution (I think).<br>
><br>
> Is there a way to make a vcproj be included in a sln without it building as<br>
> part of the dependency chain?<br>
><br>
> Thanks in advance.<br>
><br>
</div></div><span class="HOEnZb"><font color="#888888">> --<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<br>
> <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:<br>
> <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>
</font></span></blockquote></div><br></div></div>