forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user