forked from qt-creator/qt-creator
Run the project cmake command in a ./qtcreator-build directory.
This commit is contained in:
@@ -80,9 +80,10 @@ CMakeProject::~CMakeProject()
|
|||||||
// TODO make this function work even if it is reparsing
|
// TODO make this function work even if it is reparsing
|
||||||
void CMakeProject::parseCMakeLists(const QDir &directory)
|
void CMakeProject::parseCMakeLists(const QDir &directory)
|
||||||
{
|
{
|
||||||
createCbpFile(directory);
|
QDir buildDirectory(directory.absolutePath() + "/qtcreator-build");
|
||||||
|
createCbpFile(buildDirectory);
|
||||||
|
|
||||||
QString cbpFile = findCbpFile(directory);
|
QString cbpFile = findCbpFile(buildDirectory);
|
||||||
|
|
||||||
CMakeCbpParser cbpparser;
|
CMakeCbpParser cbpparser;
|
||||||
qDebug()<<"Parsing file "<<cbpFile;
|
qDebug()<<"Parsing file "<<cbpFile;
|
||||||
@@ -152,9 +153,10 @@ void CMakeProject::createCbpFile(const QDir &directory)
|
|||||||
|
|
||||||
// TODO we need to pass on the same paremeters as the cmakestep
|
// TODO we need to pass on the same paremeters as the cmakestep
|
||||||
qDebug()<<"Creating cbp file";
|
qDebug()<<"Creating cbp file";
|
||||||
|
directory.mkpath(directory.absolutePath());
|
||||||
QProcess cmake;
|
QProcess cmake;
|
||||||
cmake.setWorkingDirectory(directory.absolutePath());
|
cmake.setWorkingDirectory(directory.absolutePath());
|
||||||
cmake.start("cmake", QStringList() << "-GCodeBlocks - Unix Makefiles");
|
cmake.start("cmake", QStringList() << ".." << "-GCodeBlocks - Unix Makefiles");
|
||||||
cmake.waitForFinished(-1);
|
cmake.waitForFinished(-1);
|
||||||
qDebug()<<"cmake output: \n"<<cmake.readAll();
|
qDebug()<<"cmake output: \n"<<cmake.readAll();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user