forked from qt-creator/qt-creator
CMake: Reimplement CMakeCache.txt parsing in BuildDirManager
The CMakeProjectImporter will need that in addition to the tealeafreader. Change-Id: I453a7a124b5303e163e9c85bc3fc215215617119 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -337,6 +337,19 @@ CMakeConfig BuildDirManager::parsedConfiguration() const
|
||||
return m_cmakeCache;
|
||||
}
|
||||
|
||||
CMakeConfig BuildDirManager::parseConfiguration(const Utils::FileName &cacheFile, QString *errorMessage)
|
||||
{
|
||||
if (!cacheFile.exists()) {
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("CMakeCache.txt file not found.");
|
||||
return { };
|
||||
}
|
||||
CMakeConfig result = CMakeConfigItem::itemsFromFile(cacheFile, errorMessage);
|
||||
if (!errorMessage->isEmpty())
|
||||
return { };
|
||||
return result;
|
||||
}
|
||||
|
||||
void BuildDirManager::checkConfiguration()
|
||||
{
|
||||
if (m_tempDir) // always throw away changes in the tmpdir!
|
||||
|
||||
Reference in New Issue
Block a user