CodeBlocks: List C++ includes first

When using the Clang Code Model in QtCreator, it turned out that having
the C system include dirs can make it report false positives for most
uses of the STL. This is due to the order the Clang Code Model looks at
the include directories and some C includes in /usr/include could be
incompatible with the used STL if found first.
This commit is contained in:
Kevin Ottens 2016-08-17 22:45:06 +02:00 committed by Brad King
parent 21c946eef4
commit 38995d19b8
1 changed files with 2 additions and 2 deletions

View File

@ -593,7 +593,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(
includes.end());
std::string systemIncludeDirs = makefile->GetSafeDefinition(
"CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS");
"CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS");
if (!systemIncludeDirs.empty()) {
std::vector<std::string> dirs;
cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);
@ -601,7 +601,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(
}
systemIncludeDirs = makefile->GetSafeDefinition(
"CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS");
"CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS");
if (!systemIncludeDirs.empty()) {
std::vector<std::string> dirs;
cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);