forked from qt-creator/qt-creator
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: hjk <hjk@qt.io>
This commit is contained in:
@@ -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><") + tr(ADD_RUNCONFIGURATION_TEXT) + QLatin1String("></i>");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user