From 62a71047bb0fb0f99c86d7312da83ec5bd0a322c Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 8 Apr 2024 18:03:00 -0400 Subject: [PATCH] cmGraphVizWriter: ignore `__cmake_`-prefixed targets These targets are internal to CMake's C++ `import std` implementation and should not appear. --- Source/cmGraphVizWriter.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index a8a7abb087..6c3afefe74 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/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()); } }