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:
Tobias Hunger
2012-11-20 17:30:05 +01:00
parent 22c3bd244f
commit 75c36c9bb5
9 changed files with 34 additions and 17 deletions

View File

@@ -303,13 +303,15 @@ bool CMakeProject::parseCMakeLists()
allIncludePaths.append(projectDirectory());
allIncludePaths.append(cbpparser.includeFiles());
QStringList cxxflags; // FIXME: We should do better than this!
QByteArray allDefines;
allDefines.append(tc->predefinedMacros(QStringList()));
allDefines.append(tc->predefinedMacros(cxxflags));
allDefines.append(cbpparser.defines());
QStringList allFrameworkPaths;
QList<ProjectExplorer::HeaderPath> allHeaderPaths;
allHeaderPaths = tc->systemHeaderPaths(SysRootKitInformation::sysRoot(k));
allHeaderPaths = tc->systemHeaderPaths(cxxflags, SysRootKitInformation::sysRoot(k));
foreach (const ProjectExplorer::HeaderPath &headerPath, allHeaderPaths) {
if (headerPath.kind() == ProjectExplorer::HeaderPath::FrameworkHeaderPath)
allFrameworkPaths.append(headerPath.path());