Add a custom executable runconfiguration for cmake projects

That is for projects that don't have a runnable target otherwise.

Task-Nr: QTCREATORBUG-1363
This commit is contained in:
dt
2010-05-10 15:09:54 +02:00
parent e4113aa813
commit 910b86b9a4

View File

@@ -34,6 +34,8 @@
#include "cmakerunconfiguration.h"
#include "cmakebuildconfiguration.h"
#include <projectexplorer/customexecutablerunconfiguration.h>
#include <QtGui/QApplication>
#include <QtGui/QStyle>
@@ -131,6 +133,12 @@ void CMakeTarget::updateRunConfigurations()
CMakeRunConfiguration *rc = it.value();
removeRunConfiguration(rc);
}
if (runConfigurations().isEmpty()) {
// Oh no, no run configuration,
// create a custom executable run configuration
ProjectExplorer::CustomExecutableRunConfiguration *rc = new ProjectExplorer::CustomExecutableRunConfiguration(this);
addRunConfiguration(rc);
}
}
// -------------------------------------------------------------------------