From 72d3f4383ea6eeff59ed26a23aafec9341bc5734 Mon Sep 17 00:00:00 2001 From: Alexander Drozdov Date: Wed, 19 Oct 2016 00:01:04 +1000 Subject: [PATCH] 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 --- src/plugins/cmakeprojectmanager/builddirmanager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/cmakeprojectmanager/builddirmanager.cpp b/src/plugins/cmakeprojectmanager/builddirmanager.cpp index cdce5ee44f3..6a49163bad9 100644 --- a/src/plugins/cmakeprojectmanager/builddirmanager.cpp +++ b/src/plugins/cmakeprojectmanager/builddirmanager.cpp @@ -722,7 +722,12 @@ void BuildDirManager::checkConfiguration() 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; m_reparseTimer.start(100);