forked from qt-creator/qt-creator
CMakePM: Do backup/restore configuration for all cases
When "Auto create build directories" is not checked, then the first configuration is done in /tmp, which is covered by workDirectory. Change-Id: Iad65b4776433ce296bd2561195fcf1bb6f8ace1d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -312,8 +312,8 @@ void FileApiReader::endState(const QFileInfo &replyFi)
|
|||||||
|
|
||||||
void FileApiReader::makeBackupConfiguration(bool store)
|
void FileApiReader::makeBackupConfiguration(bool store)
|
||||||
{
|
{
|
||||||
FilePath reply = m_parameters.buildDirectory.pathAppended(".cmake/api/v1/reply");
|
FilePath reply = m_parameters.workDirectory.pathAppended(".cmake/api/v1/reply");
|
||||||
FilePath replyPrev = m_parameters.buildDirectory.pathAppended(".cmake/api/v1/reply.prev");
|
FilePath replyPrev = m_parameters.workDirectory.pathAppended(".cmake/api/v1/reply.prev");
|
||||||
if (!store)
|
if (!store)
|
||||||
std::swap(reply, replyPrev);
|
std::swap(reply, replyPrev);
|
||||||
|
|
||||||
@@ -327,8 +327,8 @@ void FileApiReader::makeBackupConfiguration(bool store)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath cmakeCacheTxt = m_parameters.buildDirectory.pathAppended("CMakeCache.txt");
|
FilePath cmakeCacheTxt = m_parameters.workDirectory.pathAppended("CMakeCache.txt");
|
||||||
FilePath cmakeCacheTxtPrev = m_parameters.buildDirectory.pathAppended("CMakeCache.txt.prev");
|
FilePath cmakeCacheTxtPrev = m_parameters.workDirectory.pathAppended("CMakeCache.txt.prev");
|
||||||
if (!store)
|
if (!store)
|
||||||
std::swap(cmakeCacheTxt, cmakeCacheTxtPrev);
|
std::swap(cmakeCacheTxt, cmakeCacheTxtPrev);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user