Just to confirm first, there is nothing in the file-api that can be queried to get a record of the files generated by configure_file and add_custom_command(OUTPUT)? Specifically the source/command and the destination files
The isGenerated would only work if the files are actually used in a target by the current configuration right? That is ok, but it is harder to find if one has to navigate through all targets to find the target that uses that file.
But also, there doesn’t seem to be a record of the add_custom_command that generated that file. It would be useful to get additional information from both add_custom_command and add_custom_target like DEPENDS and BYPRODUCT.
The isGenerated would only work if the files are actually used in a target by the current configuration right?
Typically if the outputs are not used then the custom command won’t even be included in the generated build system.
doesn’t seem to be a record of the add_custom_command that generated that file.
CMake Issue 20463 requests custom command information in the fileapi.
try formatting the output file and then try to format back the equivalent lines in the input file.
In the linked issue I see discussion of configuring config.h.in to config.h as an example. Over in KWSys (one of CMake’s dependencies) we clang-format the .in files directly using a script like this to replace @ placeholders with valid identifiers, run clang-format on the temporary file, and then replace the identifiers with @ placeholders again.