MantisBT - CMake
View Issue Details
0016136CMakeCMakepublic2016-06-06 08:292016-06-10 14:31
Tobias Hunger 
Kitware Robot 
normalminoralways
closedmoved 
Linux, Windows, MacLinux, Windows, Mac
CMake 3.5.2 
 
0016136: cmake --build can not build several targets
I am using cmake --build in Qt Creator now and got feedback that all but the last target passed to cmake --build . --target a --target b are ignored.

It would be really convenient to be able to build more than one target in one go using cmake --build.
1) Generate any cmake project with two targets defined called A and B.
2) try to build both targets at once using cmake --build . --target A --target B
3) Watch as only target B is built.
No tags attached.
Issue History
2016-06-06 08:29Tobias HungerNew Issue
2016-06-06 08:50Brad KingNote Added: 0041137
2016-06-10 14:29Kitware RobotNote Added: 0043009
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
(0041137)
Brad King   
2016-06-06 08:50   
One of the changes in 3.6:

 https://cmake.org/cmake/help/v3.6/release/3.6.html#other-changes [^]

is that --build now rejects extra --target options instead of silently ignoring them. That is at least better than the old behavior. Actually accepting multiple --target options may require more work because we need to figure out the proper command lines for each native build tool. Some investigation will be needed to see if MSBuild even supports it, though I guess we could fall back to multiple invocations internally.
(0043009)
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.