CMake: separate processing C and C++ flags in TeaLeafReader

C and C++ flags holds at the different variables/compiler settings in
the generated Make and Ninja files.

Currently only C++ Flags processed and assumes that same one uses for
C lang. But now QtC core can handle C and C++ separatelly, so just
add processing for that flags and use it for code model.

Change-Id: If1f71a2c58284a46324f04e962fc120cc316b0fb
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Alexander Drozdov
2016-11-24 13:53:53 +10:00
parent b2e4fdee0f
commit 651460cd8d
4 changed files with 110 additions and 28 deletions

View File

@@ -65,7 +65,10 @@ BuildDirReader::Parameters::Parameters(const CMakeBuildConfiguration *bc)
auto tc = ProjectExplorer::ToolChainKitInformation::toolChain(k, ProjectExplorer::ToolChain::Language::Cxx);
if (tc)
toolChainId = tc->id();
cxxToolChainId = tc->id();
tc = ProjectExplorer::ToolChainKitInformation::toolChain(k, ProjectExplorer::ToolChain::Language::C);
if (tc)
cToolChainId = tc->id();
sysRoot = ProjectExplorer::SysRootKitInformation::sysRoot(k);
expander = k->macroExpander();