<div dir="ltr"><div>Hi Robert.<br><br></div>Whether a target is included in Visual Studio's "Build solution" is controlled by target property EXCLUDE_FROM_DEFAULT_BUILD. Would setting it for your custom target(s) help?<br>
<br>Petr<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jun 8, 2013 at 11:57 PM, Robert Dailey <span dir="ltr"><<a href="mailto:rcdailey.lists@gmail.com" target="_blank">rcdailey.lists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have two custom targets named A and B. These are not POST_BUILD<br>
targets, these are targets set to depend on files generated by custom<br>
commands. Neither custom target has the "ALL" option specified.<br>
<br>
I have called add_dependencies( A B ) to make A depend on B.<br>
<br>
When I Build Solution in Visual Studio, A does not build but B does<br>
build. I think because B is a dependency of A, even though A itself<br>
does not build, the dependency forces B to build. If I remove the<br>
add_dependencies() call, then neither A or B builds (desired<br>
behavior).<br>
<br>
If I run a build on ALL_BUILD, then regardless of dependencies set,<br>
neither A or B build (desired behavior).<br>
<br>
This seems like a defect to me. When I go to Configuration Manager<br>
(Right click solution -> Configuration Manager), I see that B is has<br>
the check box under "Build" checked. This is supposed to be unchecked.<br>
Basically when I make B a dependency of A, and B is a custom target,<br>
it should exclude B from the build unless 1) A has a dependency or 2)<br>
B has been created with the ALL option.<br>
<br>
Comments?<br>
--<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></div>