From f32f6f0652b8b99abd2cf8558a193571e47e9217 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Fri, 29 Jul 2011 23:24:21 +0200 Subject: [PATCH] Don't put files from CMAKE_ROOT into CodeBlocks projects (#12110) This causes that all files in C::B are displayed in a tree starting at / Alex --- Source/cmExtraCodeBlocksGenerator.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 4f93067c9..28ea10a06 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -266,10 +266,17 @@ void cmExtraCodeBlocksGenerator } // Convert + const char* cmakeRoot = mf->GetDefinition("CMAKE_ROOT"); for (std::vector::const_iterator jt = listFiles.begin(); jt != listFiles.end(); ++jt) { + // don't put cmake's own files into the project (#12110): + if (jt->find(cmakeRoot) == 0) + { + continue; + } + const std::string &relative = cmSystemTools::RelativePath( it->second[0]->GetMakefile()->GetHomeDirectory(), jt->c_str());