瀏覽代碼

cmGraphVizWriter: ignore `__cmake_`-prefixed targets

These targets are internal to CMake's C++ `import std` implementation
and should not appear.
Ben Boeckel 1 年之前
父節點
當前提交
62a71047bb
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Source/cmGraphVizWriter.cxx

+ 2 - 1
Source/cmGraphVizWriter.cxx

@@ -284,7 +284,8 @@ void cmGraphVizWriter::Write()
       // Reserved targets have inconsistent names across platforms (e.g. 'all'
       // vs. 'ALL_BUILD'), which can disrupt the traversal ordering.
       // We don't need or want them anyway.
-      if (!cmGlobalGenerator::IsReservedTarget(gt->GetName())) {
+      if (!cmGlobalGenerator::IsReservedTarget(gt->GetName()) &&
+          !cmHasLiteralPrefix(gt->GetName(), "__cmake_")) {
         sortedGeneratorTargets.insert(gt.get());
       }
     }