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:
Oswald Buddenhagen
2009-03-27 20:45:53 +01:00
parent cd93d9e3dd
commit deff5ac20f

View File

@@ -118,8 +118,9 @@ QProcess *CMakeManager::createXmlFile(const QStringList &arguments, const QStrin
#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;
} }