GenericProject: simplified C++ codemodel interaction.

Now it uses ProjectPart::evaluateToolchain() to read toolchain info with
given compiler flags.

Change-Id: I97c643707e1626424824aa9b53786f146b0f4790
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Sergey Shambir
2013-04-28 19:43:13 +04:00
parent 8ac43525fb
commit 2ddb1f9849

View File

@@ -254,15 +254,8 @@ void GenericProject::refresh(RefreshOptions options)
Kit *k = activeTarget() ? activeTarget()->kit() : KitManager::instance()->defaultKit();
if (ToolChain *tc = ToolChainKitInformation::toolChain(k)) {
QStringList cxxflags; // FIXME: Can we do better?
part->defines = tc->predefinedMacros(cxxflags);
part->defines += '\n';
foreach (const HeaderPath &headerPath, tc->systemHeaderPaths(cxxflags, SysRootKitInformation::sysRoot(k))) {
if (headerPath.kind() == HeaderPath::FrameworkHeaderPath)
part->frameworkPaths.append(headerPath.path());
else
part->includePaths.append(headerPath.path());
}
part->evaluateToolchain(tc, cxxflags, cxxflags,
SysRootKitInformation::sysRoot(k));
}
part->includePaths += allIncludePaths();