I add the custom targets as a dependency with add_dependencies(), and I create the targets with add_custom_target(), I don&#39;t specify &quot;ALL&quot;.<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">&lt;<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>&gt;</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 &quot;ALL&quot; argument. If you<br>
don&#39;t use &quot;ALL&quot;, 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 &lt;<a href="mailto:rcdailey.lists@gmail.com">rcdailey.lists@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I have a custom target that just runs some commands that have nothing to do<br>
&gt; with building source. For convenience, when generating visual studio<br>
&gt; projects, I&#39;d like for that target to be included in the SLN generated by<br>
&gt; project() but I don&#39;t want to make it a dependency, since that would force<br>
&gt; it to build when I build any other project in the solution (I think).<br>
&gt;<br>
&gt; Is there a way to make a vcproj be included in a sln without it building as<br>
&gt; part of the dependency chain?<br>
&gt;<br>
&gt; Thanks in advance.<br>
&gt;<br>
</div></div><span class="HOEnZb"><font color="#888888">&gt; --<br>
&gt;<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt; <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <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>