forked from qt-creator/qt-creator
CMakePM: Do not reconfigure during build
On Windows upon a CMake file change and save during a build, the reconfiguration would fail due to the inability to save the build.ninja file. Fixes: QTCREATORBUG-30048 Change-Id: I68bec70b0a95bc4256b736a1c4caf1b4d706e43b Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
#include <cppeditor/cppeditorconstants.h>
|
#include <cppeditor/cppeditorconstants.h>
|
||||||
#include <cppeditor/cppprojectupdater.h>
|
#include <cppeditor/cppprojectupdater.h>
|
||||||
|
|
||||||
|
#include <projectexplorer/buildmanager.h>
|
||||||
#include <projectexplorer/extracompiler.h>
|
#include <projectexplorer/extracompiler.h>
|
||||||
#include <projectexplorer/kitaspects.h>
|
#include <projectexplorer/kitaspects.h>
|
||||||
#include <projectexplorer/projectexplorer.h>
|
#include <projectexplorer/projectexplorer.h>
|
||||||
@@ -1299,7 +1300,8 @@ void CMakeBuildSystem::wireUpConnections()
|
|||||||
});
|
});
|
||||||
|
|
||||||
connect(project(), &Project::projectFileIsDirty, this, [this] {
|
connect(project(), &Project::projectFileIsDirty, this, [this] {
|
||||||
if (buildConfiguration()->isActive() && !isParsing()) {
|
const bool isBuilding = BuildManager::isBuilding(project());
|
||||||
|
if (buildConfiguration()->isActive() && !isParsing() && !isBuilding) {
|
||||||
if (settings().autorunCMake()) {
|
if (settings().autorunCMake()) {
|
||||||
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to dirty project file";
|
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to dirty project file";
|
||||||
reparse(CMakeBuildSystem::REPARSE_FORCE_CMAKE_RUN);
|
reparse(CMakeBuildSystem::REPARSE_FORCE_CMAKE_RUN);
|
||||||
|
Reference in New Issue
Block a user