浏览代码

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
Alex Neundorf 14 年之前
父节点
当前提交
f32f6f0652
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      Source/cmExtraCodeBlocksGenerator.cxx

+ 7 - 0
Source/cmExtraCodeBlocksGenerator.cxx

@@ -266,10 +266,17 @@ void cmExtraCodeBlocksGenerator
       }
 
     // Convert
+    const char* cmakeRoot = mf->GetDefinition("CMAKE_ROOT");
     for (std::vector<std::string>::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());