CMake: Handle environment changes in cmake better

Handle environment changes in cmake better.

Server-mode will trigger an reader-change when the environment changes.
This has not been considered so far and a reader-change triggered by
an environment change was considered an error (and ignored).

Change-Id: I2d0baadbcfc86e04348c75d8e5997817bdc233a5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tobias Hunger
2019-07-30 11:52:43 +02:00
parent f9c246b26e
commit 86c4416af6

View File

@@ -204,9 +204,9 @@ CMakeProject::CMakeProject(const FilePath &fileName) : Project(Constants::CMAKEM
// * Error out if the reader updates, cannot happen since all BCs share a target/kit. // * Error out if the reader updates, cannot happen since all BCs share a target/kit.
// * run cmake without configuration arguments if the reader stays // * run cmake without configuration arguments if the reader stays
m_buildDirManager.setParametersAndRequestParse( m_buildDirManager.setParametersAndRequestParse(
BuildDirParameters(senderBc), BuildDirParameters(senderBc),
BuildDirManager::REPARSE_FAIL, BuildDirManager::REPARSE_CHECK_CONFIGURATION, // server-mode might need a restart...
BuildDirManager::REPARSE_CHECK_CONFIGURATION); BuildDirManager::REPARSE_CHECK_CONFIGURATION);
} }
}); });
subscribeSignal(&CMakeBuildConfiguration::buildDirectoryChanged, this, [this]() { subscribeSignal(&CMakeBuildConfiguration::buildDirectoryChanged, this, [this]() {