From fc411cd0d1806435a9c89e8a10cdfed012663fd9 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Thu, 4 Feb 2021 16:22:40 +0100 Subject: CMakeProjectManager: Make backup of CMake configuration before starting CMake CMake's fileapi functionality will save the project structure in json files in the .cmake/api/v1/reply directory. When issuing a cmake command with -D variables CMake will update its CMakeCache.txt file even if cmake will fail. This commit will rename .cmake/api/v1/reply as .cmake/api/v1/reply.prev and make a copy of CMakeCache.txt before starting CMake, and if something fails, replace the existing files with the previous values. Also make sure the changed values are not dissappearing when the old .cmake/api/v1/reply gets parsed. Fixes: QTCREATORBUG-24593 Change-Id: I82141786fea7068699e0f761a8978ba1f3203e47 Reviewed-by: Eike Ziller --- src/plugins/cmakeprojectmanager/builddirparameters.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/cmakeprojectmanager/builddirparameters.cpp') diff --git a/src/plugins/cmakeprojectmanager/builddirparameters.cpp b/src/plugins/cmakeprojectmanager/builddirparameters.cpp index 023de6b071..0c06c329f5 100644 --- a/src/plugins/cmakeprojectmanager/builddirparameters.cpp +++ b/src/plugins/cmakeprojectmanager/builddirparameters.cpp @@ -59,7 +59,7 @@ BuildDirParameters::BuildDirParameters(CMakeBuildConfiguration *bc) }); initialCMakeArguments = Utils::filtered(expandedArguments, [](const QString &s) { return !s.isEmpty(); }); - extraCMakeArguments = Utils::transform(bc->extraCMakeArguments(), + extraCMakeArguments = Utils::transform(bc->configurationChangesArguments(), [expander](const QString &s) { return expander->expand(s); }); -- cgit v1.2.1