Commit 2ddb1f98 authored by Sergey Shambir's avatar Sergey Shambir
Browse files

GenericProject: simplified C++ codemodel interaction.



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

Change-Id: I97c643707e1626424824aa9b53786f146b0f4790
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 8ac43525
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment