forked from qt-creator/qt-creator
ProjectExplorer: Move BuildSystem owership to BuildConfiguration
... or Target. This patch moves build system from conceptually "one per project" to "one per target (i.e. per project-and-kit)" or "per BuildConfigurations" for targets where the builds differ significantly. Building requires usually items from the kit (Qt version, compiler, ...) so a target-agnostic build is practically almost always wrong. Moving the build system to the target also has the potential to solve issues caused by switching targets while parsing, that used Project::activeTarget() regularly, with potentially different results before and after the switch. This patch might create performance/size regressions when several targets are set up per project as the build system implementation's internal data are duplicated in this case. The idea is to fix that by sharing per-project pieces again in the project implementation once these problems occur. Change-Id: I87f640ce418b93175b5029124eaa55f3b8721dca Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -45,7 +45,7 @@ BuildDirParameters::BuildDirParameters() = default;
|
||||
|
||||
BuildDirParameters::BuildDirParameters(CMakeBuildConfiguration *bc)
|
||||
{
|
||||
buildConfiguration = bc;
|
||||
initialized = bc != nullptr;
|
||||
|
||||
const Kit *k = bc->target()->kit();
|
||||
|
||||
@@ -82,7 +82,7 @@ BuildDirParameters::BuildDirParameters(CMakeBuildConfiguration *bc)
|
||||
generatorArguments = CMakeGeneratorKitAspect::generatorArguments(k);
|
||||
}
|
||||
|
||||
bool BuildDirParameters::isValid() const { return buildConfiguration && cmakeTool(); }
|
||||
bool BuildDirParameters::isValid() const { return initialized && cmakeTool(); }
|
||||
|
||||
CMakeTool *BuildDirParameters::cmakeTool() const
|
||||
{
|
||||
|
Reference in New Issue
Block a user