From b5d6348b67fdf0e8c75af85df821b74cb18b339b Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Thu, 27 Jun 2024 17:03:36 +0200 Subject: [PATCH] CMakePM: Update initial CMake variables also on failed CMake runs A failed CMake run configuration could be the result of an compiler update which then would cause CMake to fail. Make sure to offer an upgrade path to the new Kit compiler values. Change-Id: Ibabeb853259e23fe012d8b00e3d48979deee61a5 Reviewed-by: Alessandro Portale --- src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index 8c4617144d4..540192d2d21 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -1488,6 +1488,11 @@ void CMakeBuildSystem::updateFallbackProjectData() Tr::tr("Scan \"%1\" project tree") .arg(project()->displayName()), "CMake.Scan.Tree"); + + // A failed configuration could be the result of an compiler update + // which then would cause CMake to fail. Make sure to offer an upgrade path + // to the new Kit compiler values. + updateInitialCMakeExpandableVars(); } void CMakeBuildSystem::updateCMakeConfiguration(QString &errorMessage)