aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cmakeprojectmanager/makestep.cpp
diff options
context:
space:
mode:
authorTobias Hunger <[email protected]>2012-04-24 15:49:09 +0200
committerTobias Hunger <[email protected]>2012-06-21 12:08:12 +0200
commit24314562165588b56a318b3b8a846bf5deda7c41 (patch)
treeb5dcf951e76d003c2623011b0e91994e06e7e061 /src/plugins/cmakeprojectmanager/makestep.cpp
parent8c77b8c9d7b25d0c89003c8c4a54e8da5bfb7edd (diff)
Profile introduction
Introduce Profiles to store sets of values that describe a system/device. These profiles are held by a target, getting rid of much of the information stored in the Build-/Run-/DeployConfigurations, greatly simplifying those. This is a squash of the wip/profile branch which has been on gerrit for a while, rebased to current master. Change-Id: I25956c8dd4d1962b2134bfaa8a8076ae3909460f Reviewed-by: Daniel Teske <[email protected]>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/makestep.cpp')
-rw-r--r--src/plugins/cmakeprojectmanager/makestep.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/plugins/cmakeprojectmanager/makestep.cpp b/src/plugins/cmakeprojectmanager/makestep.cpp
index a28afbd02e6..fc8f885b542 100644
--- a/src/plugins/cmakeprojectmanager/makestep.cpp
+++ b/src/plugins/cmakeprojectmanager/makestep.cpp
@@ -34,14 +34,16 @@
#include "cmakeprojectconstants.h"
#include "cmakeproject.h"
-#include "cmaketarget.h"
#include "cmakebuildconfiguration.h"
#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/toolchain.h>
-#include <projectexplorer/projectexplorer.h>
+#include <projectexplorer/deployconfiguration.h>
#include <projectexplorer/gnumakeparser.h>
+#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
+#include <projectexplorer/target.h>
+#include <projectexplorer/toolchain.h>
#include <utils/qtcprocess.h>
@@ -138,19 +140,20 @@ bool MakeStep::init()
setIgnoreReturnValue(m_clean);
+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile());
ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander());
pp->setEnvironment(bc->environment());
pp->setWorkingDirectory(bc->buildDirectory());
- if (bc->toolChain())
- pp->setCommand(bc->toolChain()->makeCommand());
+ if (tc)
+ pp->setCommand(tc->makeCommand());
else
pp->setCommand(QLatin1String("make"));
pp->setArguments(arguments);
setOutputParser(new ProjectExplorer::GnuMakeParser());
- if (bc->toolChain())
- appendOutputParser(bc->toolChain()->outputParser());
+ if (tc)
+ appendOutputParser(tc->outputParser());
outputParser()->setWorkingDirectory(pp->effectiveWorkingDirectory());
return AbstractProcessStep::init();
@@ -302,7 +305,13 @@ void MakeStepConfigWidget::updateDetails()
CMakeBuildConfiguration *bc = m_makeStep->cmakeBuildConfiguration();
if (!bc)
bc = static_cast<CMakeBuildConfiguration *>(m_makeStep->target()->activeBuildConfiguration());
- ProjectExplorer::ToolChain *tc = bc->toolChain();
+ if (!bc) {
+ m_summaryText = tr("<b>No build configuration found on this target.</b>");
+ updateSummary();
+ return;
+ }
+
+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(m_makeStep->target()->profile());
if (tc) {
QString arguments = Utils::QtcProcess::joinArgs(m_makeStep->buildTargets());
Utils::QtcProcess::addArgs(&arguments, m_makeStep->additionalArguments());
@@ -315,7 +324,7 @@ void MakeStepConfigWidget::updateDetails()
param.setArguments(arguments);
m_summaryText = param.summary(displayName());
} else {
- m_summaryText = tr("<b>Unknown tool chain</b>");
+ m_summaryText = tr("<b>No tool chain set for this target</b>");
}
emit updateSummary();
}