Browse Source

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.
Kevin Ottens 9 years ago
parent
commit
38995d19b8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/cmExtraCodeBlocksGenerator.cxx

+ 2 - 2
Source/cmExtraCodeBlocksGenerator.cxx

@@ -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);