CMake: Fix Clear Cache when builddir is not persistent yet.

Change-Id: I4dc2c5889845b13ebe167b89e78b104f8805a1f6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tobias Hunger
2016-05-12 12:24:56 +02:00
parent 53770ebaa5
commit 82b6d728c7

View File

@@ -231,8 +231,8 @@ void BuildDirManager::parse()
void BuildDirManager::clearCache() void BuildDirManager::clearCache()
{ {
auto cmakeCache = Utils::FileName(buildDirectory()).appendPath(QLatin1String("CMakeCache.txt")); auto cmakeCache = Utils::FileName(workDirectory()).appendPath(QLatin1String("CMakeCache.txt"));
auto cmakeFiles = Utils::FileName(buildDirectory()).appendPath(QLatin1String("CMakeFiles")); auto cmakeFiles = Utils::FileName(workDirectory()).appendPath(QLatin1String("CMakeFiles"));
const bool mustCleanUp = cmakeCache.exists() || cmakeFiles.exists(); const bool mustCleanUp = cmakeCache.exists() || cmakeFiles.exists();
if (!mustCleanUp) if (!mustCleanUp)