forked from qt-creator/qt-creator
CMake: Fix cmake config can't be changed by user in tealeaf mode
Changes to the cmake configuration (via projects page) are not applied in tealeaf mode. The tealeafreader::parse method passes changed config parameters to cmake only if the .cpb file does not exist. Since that file always exists after project initialization the user can't change the cmake config anymore. Make tealeaf reader pass changed config parameters to cmake when a reparse is forced. This restores the behavior from 4.2.2 Change-Id: I31ffad32d176e6290064b55758e4df96d2ffe6bc Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -192,14 +192,13 @@ void TeaLeafReader::parse(bool force)
|
||||
{
|
||||
const QString cbpFile = findCbpFile(QDir(m_parameters.buildDirectory.toString()));
|
||||
const QFileInfo cbpFileFi = cbpFile.isEmpty() ? QFileInfo() : QFileInfo(cbpFile);
|
||||
if (!cbpFileFi.exists()) {
|
||||
if (!cbpFileFi.exists() || force) {
|
||||
// Initial create:
|
||||
startCMake(toArguments(m_parameters.configuration, m_parameters.expander));
|
||||
return;
|
||||
}
|
||||
|
||||
const bool mustUpdate = force
|
||||
|| m_cmakeFiles.isEmpty()
|
||||
const bool mustUpdate = m_cmakeFiles.isEmpty()
|
||||
|| anyOf(m_cmakeFiles, [&cbpFileFi](const FileName &f) {
|
||||
return f.toFileInfo().lastModified() > cbpFileFi.lastModified();
|
||||
});
|
||||
|
Reference in New Issue
Block a user