CMake: handle CMake files saving only for active build configuration

...otherwise all previously selected build configurations begins to
process changes in CMakeLists.txt or other cmake-related files after
save it.

Change-Id: I86ff59022c85d88052ff434480e670ebddd90864
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Alexander Drozdov
2016-10-19 00:01:04 +10:00
committed by Tobias Hunger
parent 60ab12342d
commit 72d3f4383e

View File

@@ -722,7 +722,12 @@ void BuildDirManager::checkConfiguration()
void BuildDirManager::handleDocumentSaves(Core::IDocument *document) void BuildDirManager::handleDocumentSaves(Core::IDocument *document)
{ {
if (!m_cmakeFiles.contains(document->filePath())) Target *t = m_buildConfiguration->target()->project()->activeTarget();
BuildConfiguration *bc = t ? t->activeBuildConfiguration() : nullptr;
if (!m_cmakeFiles.contains(document->filePath()) ||
m_buildConfiguration->target() != t ||
m_buildConfiguration != bc)
return; return;
m_reparseTimer.start(100); m_reparseTimer.start(100);