MantisBT - CMake
View Issue Details
0015931CMakeCMakepublic2016-01-21 13:262016-06-10 14:31
Luis Roalter 
Kitware Robot 
normalfeaturealways
closedmoved 
MSVCWindows
CMake 3.4.2 
 
0015931: Change the StartUp-Solution by Value
CMake always tries to set ALL_BUILD in Visual Studio Projects as the first project in the Solution file. This is okay if I want to build all the content.
But sometimes it would be great to change this behavior to a custom project as well.

The point is: Pressing F5 in Studio (just run the Application) won't work. Sure, you can setup the startup project manually. But it would be gread to set it per-project (means per solution).

I've patched it to use CMAKE_STARTUP_SOLUTION. This exchanges the string "ALL_BUILD" in the comparison of the project if possible. It would be even better to make something like

set_property(GLOBAL PROPERTY STARTUP_APPLICATION MainWindow). This should only scope till the next project().
Just press F5 on a Studio-runnable application.
No tags attached.
duplicate of 0015578closed  Target property that sets Startup Project in MSVC 
Issue History
2016-01-21 13:26Luis RoalterNew Issue
2016-01-21 13:51Brad KingNote Added: 0040296
2016-02-28 00:44Eric WingNote Added: 0040568
2016-03-15 16:54Nils GladitzRelationship addedduplicate of 0015578
2016-06-10 14:29Kitware RobotNote Added: 0042919
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0040296)
Brad King   
2016-01-21 13:51   
For reference, there is a related change here:

 VS: Refactor target ordering logic
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=03bfe71a [^]

It still hard-codes the "ALL_BUILD" name, just in a different place than it used to.
(0040568)
Eric Wing   
2016-02-28 00:44   
I want something like this. And also for Xcode.

The number one piece of confusion I'm getting from people is they can't figure out how to build a product from the generated CMake project. People understand enough and use VS/Xcode enough to know the Run button is supposed to build+run your program. CMake's ALL_BUILD goes against the standard workflow and intuition. And this makes for a poor first-time user-experience with CMake.
(0042919)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.