<div dir="ltr"><p class=""><span lang="EN-GB">Hi there</span></p>

<p class=""><span lang="EN-GB">Is there a
way to tell the Visual Studio generators that a target should not be included
in “whole solution” builds?</span></p>

<p class=""><span lang="EN-GB">With the
following sequence A will be excluded from all solution configurations, but B
will be included.</span></p>

<p class="" style="text-indent:0.5in"><span lang="EN-GB">add_custom_target(A)</span></p><p class="" style="text-indent:0.5in">add_custom_target(B COMMAND echo This is target B)</p><p class="" style="text-indent:0.5in">add_dependencies(A B)</p>


<p class=""><span lang="EN-GB">I’m
actually trying to define a set of targets that do not get built automatically
when one does a “solution build” in Visual Studio. I.e. I’d like to find a way
to have B excluded as well.</span></p>

<p class=""><span lang="EN-GB">Is this
possible at all?</span></p>

<p class=""><span lang="EN-GB">Thanks in
advance! And thanks to the CMake folks for the great tool!</span></p></div>