CMake: Enable switching between different temporary CMake configurations

This got broken when moving the BuildDirManager from the BuildConfiguration
into the Project itself.

As a side-effect this patch also fixes the persisting of cmake state.

Task-number: QTCREATORBUG-19075
Change-Id: I1fc696097b09f5285e67f20885eb1fa27504990b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tobias Hunger
2017-10-18 13:05:44 +02:00
parent 79226a66eb
commit 4acb16272d
6 changed files with 38 additions and 23 deletions

View File

@@ -160,11 +160,11 @@ CMakeProject::CMakeProject(const FileName &fileName) : Project(Constants::CMAKEM
return;
// Build configuration has switched:
// * Error out if the reader updates, can not happen since all BCs share a target/kit.
// * Check configuration if reader changes due to it not existing yet:-)
// * run cmake without configuration arguments if the reader stays
m_buildDirManager.setParametersAndRequestParse(
BuildDirParameters(bc),
BuildDirManager::REPARSE_FAIL,
BuildDirManager::REPARSE_CHECK_CONFIGURATION,
BuildDirManager::REPARSE_CHECK_CONFIGURATION);
});