CMake: Fall back to reading CMakeCache.txt

Allows the user to select cache settings even if configuring failed.

Change-Id: I821c28f386e0c249b4c4d9c6561a377cb48b3f2d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Marcus Tillmanns
2023-12-14 15:15:58 +01:00
parent 16b40c5bb6
commit 690d6a6c8f
3 changed files with 9 additions and 1 deletions

View File

@@ -263,6 +263,7 @@ void FileApiReader::endState(const FilePath &replyFilePath, bool restoredFromBac
auto result = std::make_shared<FileApiQtcData>();
FileApiData data = FileApiParser::parseData(promise,
replyFilePath,
buildDirectory,
cmakeBuildType,
result->errorMessage);
if (result->errorMessage.isEmpty()) {
@@ -270,6 +271,7 @@ void FileApiReader::endState(const FilePath &replyFilePath, bool restoredFromBac
sourceDirectory, buildDirectory);
} else {
qWarning() << result->errorMessage;
result->cache = std::move(data.cache);
}
promise.addResult(result);