<div class="gmail_quote">On Fri, Mar 4, 2011 at 12:25 PM,  <span dir="ltr">&lt;<a href="mailto:aaron.meadows@thomsonreuters.com">aaron.meadows@thomsonreuters.com</a>&gt;</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;">
<div link="blue" vlink="purple" lang="EN-US"><div><div class="im"><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt; It is (forced by backwards compatibility requirements) by design.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt; </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt; Here is the source code where I wanted to assign it to the CMakePredefinedTargetsFolder:</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt; </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt; #if 0</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt;       // Can&#39;t activate this code because we want ALL_BUILD</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt;       // selected as the default &quot;startup project&quot; when first</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt;       // opened in Visual Studio... And if it&#39;s nested in a</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt;       // folder, then that doesn&#39;t happen.</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt;       //</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt;       // Organize in the &quot;predefined targets&quot; folder:</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt;       //</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt;       if (this-&gt;UseFolderProperty())</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt;         {</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt;         allBuild-&gt;SetProperty(&quot;FOLDER&quot;, this-&gt;GetPredefinedTargetsFolder());</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt;         }</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt; #endif</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt; </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt; </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt; Sorry,</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt; David</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
</div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Is there some reason that couldn’t be a property as well?  Or possibly a Policy?  I’m not sure I understand 1) why ALL_BUILD couldn’t be the default project from within a folder, and 2) why it needs to be the default project (beyond backward compatibility.).</span></p>
</div><div class="im"><br clear="all"> This email was sent to you by Thomson Reuters, the global news and information company.<br>
Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.
</div></div>

</blockquote></div><br><br>To answer your 2 questions:<br><br>1) why ALL_BUILD couldn&#39;t be the default project from within a folder<br><br>- I&#39;m not sure that it can&#39;t be, but empirically it appears not to be. Part of the problem here is that nobody seems to have a good understanding or documentation that tells us exactly how the &quot;default startup project&quot; is determined in the (initial) absence of the end user&#39;s choice which is saved in the corresponding Visual Studio Solution User Options file (*.suo). Since that code is sensitive and we didn&#39;t want to rock the boat, the above &quot;punt and #if 0&quot; (quick) approach was settled on for inclusion in the CMake 2.8.3 release<br>
<br>2) why does ALL_BUILD need to be the default project<br><br>- This one I can&#39;t answer. I don&#39;t understand why it even is the default startup project anyhow. As such, it&#39;s useless. It seems to me that your *main executable* target (although we do not have such a designation, one would be nice) should be the default startup project, so that F5 / &quot;menu &gt; Debug &gt; Start Debugging&quot; just works without having to manually set a startup project. Build Solution / F7 / Ctrl+Shift+B builds ALL_BUILD regardless of what the default startup project is.<br>
<br><br>Patches, pointers to good docs from MSFT, and suggestions are always welcome.<br><br>After writing this, I have it in my head to add a well-known target property that means &quot;main executable&quot; or &quot;default startup project&quot; -- but implementing that property correctly for all versions of VS is probably more work than I want to think about on a Friday afternoon.<br>
<br><br>Thanks for listening,<br>David<br><br>