<div class="gmail_quote">On Fri, Mar 4, 2011 at 12:25 PM, <span dir="ltr"><<a href="mailto:aaron.meadows@thomsonreuters.com">aaron.meadows@thomsonreuters.com</a>></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);">> It is (forced by backwards compatibility requirements) by design.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> 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);">> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> #if 0</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> // Can't activate this code because we want ALL_BUILD</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> // selected as the default "startup project" when first</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> // opened in Visual Studio... And if it's nested in a</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> // folder, then that doesn't happen.</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> //</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> // Organize in the "predefined targets" folder:</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> //</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> if (this->UseFolderProperty())</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> {</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> allBuild->SetProperty("FOLDER", this->GetPredefinedTargetsFolder());</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> }</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> #endif</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> Sorry,</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">> 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't be the default project from within a folder<br><br>- I'm not sure that it can'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 "default startup project" is determined in the (initial) absence of the end user's choice which is saved in the corresponding Visual Studio Solution User Options file (*.suo). Since that code is sensitive and we didn't want to rock the boat, the above "punt and #if 0" (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't answer. I don't understand why it even is the default startup project anyhow. As such, it'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 / "menu > Debug > Start Debugging" 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 "main executable" or "default startup project" -- 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>