forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user