On Fri, Mar 4, 2011 at 12:25 PM, <aaron.mead...@thomsonreuters.com> wrote:
> > It is (forced by backwards compatibility requirements) by design. > > > > > > Here is the source code where I wanted to assign it to the > CMakePredefinedTargetsFolder: > > > > > > #if 0 > > > // Can't activate this code because we want ALL_BUILD > > > // selected as the default "startup project" when first > > > // opened in Visual Studio... And if it's nested in a > > > // folder, then that doesn't happen. > > > // > > > // Organize in the "predefined targets" folder: > > > // > > > if (this->UseFolderProperty()) > > > { > > > allBuild->SetProperty("FOLDER", > this->GetPredefinedTargetsFolder()); > > > } > > > #endif > > > > > > > > > Sorry, > > > David > > > > 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.). > > This email was sent to you by Thomson Reuters, the global news and > information company. > 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. > To answer your 2 questions: 1) why ALL_BUILD couldn't be the default project from within a folder - 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 2) why does ALL_BUILD need to be the default project - 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. Patches, pointers to good docs from MSFT, and suggestions are always welcome. 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. Thanks for listening, David
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake