How to prevent CMake File API from generating irrelevant build information

I am currently developing a tool that utilizes the CMake File API to obtain build information from a CMake project, such as targets, source files, compilation options, etc., to facilitate the porting of build scripts. This is effective in many cases.

However, sometimes the CMake File API generates some targets that are not of reference value. For example:
Target: ‘Continuous’:
Source File: [‘my_oh_build/CMakeFiles/Continuous’, ‘my_oh_build/CMakeFiles/Continuous.rule’]

The ‘my_oh_build’ is a folder I generated, and the original project does not contain this file. The ‘.rule’ files here are also of no use for project compilation (they are not C/C++ files), and I don’t want it to generate such files. Alternatively, can someone tell me how these files can help me better obtain build information? Thank you!

That target comes from add_custom_target() via include(CTest). So it is there, but closer to “implicit” due to being part of CTest.