forked from qt-creator/qt-creator
Make CMakeTool known to the Kits
This patch adds support for binding a specific CMakeTool to a Kit. When creating a new Kit or loading a existing one without a valid CMakeTool, the default CMakeTool will be set. Change-Id: I28d0843a01c583c4b31fc680a0ec556b40cd9c0d Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
@@ -128,38 +128,6 @@ QString CMakeManager::mimeType() const
|
||||
return QLatin1String(Constants::CMAKEPROJECTMIMETYPE);
|
||||
}
|
||||
|
||||
QString CMakeManager::cmakeExecutable() const
|
||||
{
|
||||
CMakeTool *cmake = CMakeToolManager::defaultCMakeTool();
|
||||
if (cmake)
|
||||
return cmake->cmakeExecutable().toString();
|
||||
return QString();
|
||||
}
|
||||
|
||||
bool CMakeManager::isCMakeExecutableValid() const
|
||||
{
|
||||
CMakeTool *cmake = CMakeToolManager::defaultCMakeTool();
|
||||
if (cmake)
|
||||
return cmake->isValid();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CMakeManager::hasCodeBlocksMsvcGenerator() const
|
||||
{
|
||||
CMakeTool *cmake = CMakeToolManager::defaultCMakeTool();
|
||||
if (cmake)
|
||||
return cmake->hasCodeBlocksMsvcGenerator();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CMakeManager::hasCodeBlocksNinjaGenerator() const
|
||||
{
|
||||
CMakeTool *cmake = CMakeToolManager::defaultCMakeTool();
|
||||
if (cmake)
|
||||
return cmake->hasCodeBlocksNinjaGenerator();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CMakeManager::preferNinja() const
|
||||
{
|
||||
return CMakeToolManager::preferNinja();
|
||||
@@ -169,7 +137,7 @@ bool CMakeManager::preferNinja() const
|
||||
// we probably want the process instead of this function
|
||||
// cmakeproject then could even run the cmake process in the background, adding the files afterwards
|
||||
// sounds like a plan
|
||||
void CMakeManager::createXmlFile(Utils::QtcProcess *proc, const QString &arguments,
|
||||
void CMakeManager::createXmlFile(Utils::QtcProcess *proc, const QString &executable, const QString &arguments,
|
||||
const QString &sourceDirectory, const QDir &buildDirectory,
|
||||
const Utils::Environment &env, const QString &generator)
|
||||
{
|
||||
@@ -184,7 +152,7 @@ void CMakeManager::createXmlFile(Utils::QtcProcess *proc, const QString &argumen
|
||||
Utils::QtcProcess::addArg(&args, srcdir);
|
||||
Utils::QtcProcess::addArgs(&args, arguments);
|
||||
Utils::QtcProcess::addArg(&args, generator);
|
||||
proc->setCommand(cmakeExecutable(), args);
|
||||
proc->setCommand(executable, args);
|
||||
proc->start();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user