From eeea1e6c3232a5096a7747125d16c59ba34a3e8d Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 2 Dec 2020 17:55:30 +0100 Subject: [PATCH] CMake: Apply configuration changes to fresh build directories Fixes opening a new project without existing build folder, changing some configuration values, and pressing apply or choosing Run CMake. extraCMakeArguments contains the arguments needed to apply any changes done in e.g. the CMake configuration list in projects mode. When pressing Apply, the build directory gets created, and CMake run with REPARSE_FORCE_INITIAL_CONFIGURATION. But we may not remove REPARSE_FORCE_EXTRA_CONFIGURATION which might even just have been added a few lines above after asking the user via mustApplyExtraArguments(). Amends af4e74a9721a5fff29d3f11df6ab70b9890b64be Task-number: QTCREATORBUG-24936 Change-Id: I5e5547611262490ebdebb30dc1bfc690f1cdedde Reviewed-by: Cristian Adam --- src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index 88d1b561388..3e0c64bbb12 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -283,10 +283,6 @@ void CMakeBuildSystem::triggerParsing() reparseParameters |= REPARSE_FORCE_CMAKE_RUN | REPARSE_FORCE_EXTRA_CONFIGURATION; } - // Do not add extra args when doing initial configuration - if (0 != (reparseParameters & REPARSE_FORCE_INITIAL_CONFIGURATION)) - reparseParameters = reparseParameters ^ REPARSE_FORCE_EXTRA_CONFIGURATION; - qCDebug(cmakeBuildSystemLog) << "Asking reader to parse"; m_reader.parse(reparseParameters & REPARSE_FORCE_CMAKE_RUN, reparseParameters & REPARSE_FORCE_INITIAL_CONFIGURATION,