diff options
author | Benjamin Zeller <benjamin.zeller@canonical.com> | 2015-02-24 21:57:00 +0100 |
---|---|---|
committer | Benjamin Zeller <benjamin.zeller@canonical.com> | 2015-03-03 12:47:36 +0000 |
commit | 1e2d2665414d7e62bd816e542fd3ea0b568c0b69 (patch) | |
tree | cc4a7d471a0cb5f66b95021156667eff50b873cd /src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp | |
parent | 20a05c986c09f03a8c023d0189e2f61c49331193 (diff) |
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>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp index c319321c7b3..b0f5b8b49b4 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp @@ -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(); } |