forked from qt-creator/qt-creator
CMake: Fix target names for "current executable" selection
This patch is not applicable to the master-branch: The buildkeys for cmake targets have changed there. Task-number: QTCREATORBUG-22634 Change-Id: I1c8abc42792a004bdadc893129c96e1b7ed428f6 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -349,10 +349,15 @@ Utils::CommandLine CMakeBuildStep::cmakeCommand(CMakeRunConfiguration *rc) const
|
||||
QString target;
|
||||
|
||||
if (isCurrentExecutableTarget(m_buildTarget)) {
|
||||
if (rc)
|
||||
target = rc->buildKey().section('\n', 0, 0);
|
||||
else
|
||||
if (rc) {
|
||||
target = rc->buildKey();
|
||||
const int pos = target.indexOf("///::///");
|
||||
if (pos >= 0) {
|
||||
target = target.mid(pos + 8);
|
||||
}
|
||||
} else {
|
||||
target = "<i><" + tr(ADD_RUNCONFIGURATION_TEXT) + "></i>";
|
||||
}
|
||||
} else {
|
||||
target = m_buildTarget;
|
||||
}
|
||||
|
Reference in New Issue
Block a user