forked from qt-creator/qt-creator
Fix include paths with subfolder
When an autotools project is using SUBDIRS it starts a new parser. The new parser object was not propagating includes/defines/flags to the main parser object, and thus the code model did miss those. This commit fixes that. Task-number: QTCREATORBUG-21618 Change-Id: I19ed4dd3820257378e888f3c4935ebd30e958828 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -291,11 +291,26 @@ void MakefileParser::parseSubDirs()
|
||||
foreach (const QString& source, parser.sources())
|
||||
m_sources.append(subDir + slash + source);
|
||||
|
||||
// Append the include paths of the sub directory
|
||||
m_includePaths.append(parser.includePaths());
|
||||
|
||||
// Append the flags of the sub directory
|
||||
m_cflags.append(parser.cflags());
|
||||
m_cxxflags.append(parser.cxxflags());
|
||||
|
||||
// Append the macros of the sub directory
|
||||
foreach (const auto& m, parser.macros())
|
||||
{
|
||||
if (!m_macros.contains(m))
|
||||
m_macros.append(m);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Duplicates might be possible in combination with several
|
||||
// "..._SUBDIRS" targets
|
||||
m_makefiles.removeDuplicates();
|
||||
m_sources.removeDuplicates();
|
||||
}
|
||||
|
||||
if (subDirs.isEmpty())
|
||||
m_success = false;
|
||||
|
Reference in New Issue
Block a user