Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -254,15 +254,8 @@ void GenericProject::refresh(RefreshOptions options) ...@@ -254,15 +254,8 @@ void GenericProject::refresh(RefreshOptions options)
Kit *k = activeTarget() ? activeTarget()->kit() : KitManager::instance()->defaultKit(); Kit *k = activeTarget() ? activeTarget()->kit() : KitManager::instance()->defaultKit();
if (ToolChain *tc = ToolChainKitInformation::toolChain(k)) { if (ToolChain *tc = ToolChainKitInformation::toolChain(k)) {
QStringList cxxflags; // FIXME: Can we do better? QStringList cxxflags; // FIXME: Can we do better?
part->defines = tc->predefinedMacros(cxxflags); part->evaluateToolchain(tc, cxxflags, cxxflags,
part->defines += '\n'; SysRootKitInformation::sysRoot(k));
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->includePaths += allIncludePaths(); part->includePaths += allIncludePaths();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment