forked from qt-creator/qt-creator
Gcc: Support -stdlib=whatever arguments for the code model
Switching the stdlib implementation is possible with clang and results in different include pathes being used (and potentially different defines). Change-Id: I9c856256f51ceded9dc7892c1dde2bcc8c1b024c Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -408,18 +408,21 @@ void AutotoolsProject::updateCppCodeModel()
|
||||
QStringList allFrameworkPaths;
|
||||
QByteArray macros;
|
||||
|
||||
QStringList cxxflags; // FIXME: Autotools should be able to do better than this!
|
||||
|
||||
if (activeTarget()) {
|
||||
ProjectExplorer::Kit *k = activeTarget()->kit();
|
||||
ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
|
||||
if (tc) {
|
||||
const QList<HeaderPath> allHeaderPaths = tc->systemHeaderPaths(SysRootKitInformation::sysRoot(k));
|
||||
const QList<HeaderPath> allHeaderPaths = tc->systemHeaderPaths(cxxflags,
|
||||
SysRootKitInformation::sysRoot(k));
|
||||
foreach (const HeaderPath &headerPath, allHeaderPaths) {
|
||||
if (headerPath.kind() == HeaderPath::FrameworkHeaderPath)
|
||||
allFrameworkPaths.append(headerPath.path());
|
||||
else
|
||||
allIncludePaths.append(headerPath.path());
|
||||
}
|
||||
macros = tc->predefinedMacros(QStringList());
|
||||
macros = tc->predefinedMacros(cxxflags);
|
||||
macros += '\n';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user