Commit 79f5a275 authored by Tobias Hunger's avatar Tobias Hunger

CMake: Use RCs buildSystemTarget when deciding what to build

Use the RCs buildSystemTarget property when deciding what to build
with the "build current executable only" property set. This makes
the selection more robust.

Change-Id: I0dbcd764a06428b441084e6e4dc680e106c6d3bd
Reviewed-by: default avatarhjk <hjk@qt.io>
parent cad16c4b
......@@ -185,7 +185,7 @@ bool CMakeBuildStep::init(QList<const BuildStep *> &earlierSteps)
}
CMakeRunConfiguration *rc = targetsActiveRunConfiguration();
if (isCurrentExecutableTarget(m_buildTarget) && (!rc || rc->title().isEmpty())) {
if (isCurrentExecutableTarget(m_buildTarget) && (!rc || rc->buildSystemTarget().isEmpty())) {
emit addTask(Task(Task::Error,
QCoreApplication::translate("ProjectExplorer::Task",
"You asked to build the current Run Configuration's build target only, "
......@@ -348,7 +348,7 @@ QString CMakeBuildStep::allArguments(const CMakeRunConfiguration *rc) const
if (isCurrentExecutableTarget(m_buildTarget)) {
if (rc)
target = rc->title();
target = rc->buildSystemTarget();
else
target = QLatin1String("<i>&lt;") + tr(ADD_RUNCONFIGURATION_TEXT) + QLatin1String("&gt;</i>");
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment