Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 10.0.0-beta1
-
None
Description
In a CMake project with multiple targets, QtC correctly identifies those targets and adds them as run configurations. But running any of them (with build before run enabled), will build the entire project, instead of only building the target that's being run.
E.g. I would expect the behavior to be similar to
ninja myapp && ./myapp
But QtC currently does
ninja && ./myapp
Apparently this feature/behavior is available with qmake based projects .
Seeing as there's no guarantee that myapp is in the list of default targets being built, running the unspecific `ninja` is not just potentially building more than what's needed, it also may result in not rebuilding myapp.
This issue can be seen in full when importing a Qt build QT_BUILD_EXAMPLES=ON (for configuring them), but QT_BUILD_EXAMPLES_BY_DEFAULT=OFF