From 38995d19b806e8cc1d43fab0422beefd4c23431f Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Wed, 17 Aug 2016 22:45:06 +0200 Subject: [PATCH] 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. --- Source/cmExtraCodeBlocksGenerator.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 559974e38..6eae26b5e 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/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 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 dirs; cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);