forked from qt-creator/qt-creator
ProjectExplorer: Split Kit::*environment into build and run
They may differ in a containerized setup. Change-Id: Ib7e60fdd69f56e8e22bad3dfbc246e7de2fe9cd4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -661,8 +661,7 @@ QVariant CMakeGeneratorKitAspect::defaultValue(const Kit *k) const
|
||||
= Internal::CMakeProjectPlugin::projectTypeSpecificSettings();
|
||||
|
||||
if (settings->ninjaPath.filePath().isEmpty()) {
|
||||
Utils::Environment env = Utils::Environment::systemEnvironment();
|
||||
k->addToEnvironment(env);
|
||||
Utils::Environment env = k->buildEnvironment();
|
||||
return !env.searchInPath("ninja").isEmpty();
|
||||
}
|
||||
return true;
|
||||
@@ -829,7 +828,7 @@ KitAspectWidget *CMakeGeneratorKitAspect::createConfigWidget(Kit *k) const
|
||||
return new CMakeGeneratorKitAspectWidget(k, this);
|
||||
}
|
||||
|
||||
void CMakeGeneratorKitAspect::addToEnvironment(const Kit *k, Utils::Environment &env) const
|
||||
void CMakeGeneratorKitAspect::addToBuildEnvironment(const Kit *k, Utils::Environment &env) const
|
||||
{
|
||||
GeneratorInfo info = generatorInfo(k);
|
||||
if (info.generator == "NMake Makefiles JOM") {
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
void upgrade(ProjectExplorer::Kit *k) final;
|
||||
ItemList toUserOutput(const ProjectExplorer::Kit *k) const final;
|
||||
ProjectExplorer::KitAspectWidget *createConfigWidget(ProjectExplorer::Kit *k) const final;
|
||||
void addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const final;
|
||||
void addToBuildEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const final;
|
||||
|
||||
private:
|
||||
QVariant defaultValue(const ProjectExplorer::Kit *k) const;
|
||||
|
||||
Reference in New Issue
Block a user