From 442086c1dc49e8537beb360f82ea0864c5b124e0 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 8 Apr 2024 18:00:28 -0400 Subject: [PATCH] fileapi: ignore `__cmake_`-prefixed targets These targets are internal to CMake's C++ `import std` implementation and should not appear. --- Source/cmFileAPICodemodel.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx index e9302da842..869b94a66f 100644 --- a/Source/cmFileAPICodemodel.cxx +++ b/Source/cmFileAPICodemodel.cxx @@ -685,6 +685,11 @@ Json::Value CodemodelConfig::DumpTargets() continue; } + // Ignore targets starting with `__cmake_` as they are internal. + if (cmHasLiteralPrefix(gt->GetName(), "__cmake_")) { + continue; + } + targets.append(this->DumpTarget(gt, targets.size())); }