CMake: Fix CMakeCache.txt file detection

QFileInfo::exists(QString) is a static method, so the code was
looking for "CMakeCache.txt":-/

Change-Id: Ib0f9711a159fca9437ffb15c26af246ec69489ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tobias Hunger
2019-08-09 13:28:26 +02:00
parent 200b04f9ca
commit 8868989d5c

View File

@@ -289,10 +289,11 @@ void BuildDirManager::parse(int reparseParameters)
TaskHub::clearTasks(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM);
if (!m_parameters.workDirectory.toFileInfo().exists("CMakeCache.txt")) {
const QString cache = m_parameters.workDirectory.pathAppended("CMakeCache.txt").toString();
if (!QFileInfo::exists(cache)) {
reparseParameters |= REPARSE_FORCE_CONFIGURATION | REPARSE_FORCE_CMAKE_RUN;
qCDebug(cmakeBuildDirManagerLog)
<< "No CMakeCache.txt file found, new flags:" << flagsString(reparseParameters);
<< "No" << cache << "file found, new flags:" << flagsString(reparseParameters);
} else if (reparseParameters & REPARSE_CHECK_CONFIGURATION) {
if (checkConfiguration()) {
reparseParameters |= REPARSE_FORCE_CONFIGURATION | REPARSE_FORCE_CMAKE_RUN;