forked from qt-creator/qt-creator
re-use pre-existing builds
run "cmake . [...]" if a build already exists in the build dir. this saves the user from reproducing all the arguments he may need. on the downside, this will go utterly awry if the source dir of the existing build is a different one than known to creator. this should be a rather rare corner case, so ignore it for now. the nice solution would be a checkbox (on by default) to request this new behavior.
This commit is contained in:
@@ -116,10 +116,11 @@ QProcess *CMakeManager::createXmlFile(const QStringList &arguments, const QStrin
|
|||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QString generator = "-GCodeBlocks - MinGW Makefiles";
|
QString generator = "-GCodeBlocks - MinGW Makefiles";
|
||||||
#else // Q_OS_WIN
|
#else // Q_OS_WIN
|
||||||
QString generator = "-GCodeBlocks - Unix Makefiles";
|
QString generator = "-GCodeBlocks - Unix Makefiles";
|
||||||
#endif // Q_OS_WIN
|
#endif // Q_OS_WIN
|
||||||
qDebug()<<cmakeExecutable()<<sourceDirectory << arguments<<generator;
|
QString srcdir = buildDirectory.exists("CMakeCache.txt") ? QString(".") : sourceDirectory;
|
||||||
cmake->start(cmakeExecutable(), QStringList() << sourceDirectory << arguments << generator);
|
qDebug()<<cmakeExecutable()<<srcdir<<arguments<<generator;
|
||||||
|
cmake->start(cmakeExecutable(), QStringList() << srcdir << arguments << generator);
|
||||||
return cmake;
|
return cmake;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user