Clarification of 'backtrace' from file-api

I’m not a beginner in cmake, but up to now have never used the file api or its predecessor, the server mode.

Currently, I am trying to exploit the api and stumbled into the term ‘backtrace’. The documentation states for the first example of a backtrace entry:

member that is present when a CMake language backtrace to the command in the source code that created the target is available.

The remaining entries have similar explanations. What is the meaning of “if is available” here? Is this information from a cmake run in trace mode ( “CMake language backtrace”)? Would it be possible to clarify the relationship (if any) of both terms in the documentation? In any case, some kind of definition for backtrace would help.

Cc: @kyle.edwards @brad.king

The term “backtrace” is very widely used in software to refer to a trace through the the call stack of functions in a program. It tells you where the project’s CMakeLists.txt files created whatever the backtrace is attached to.

In the meantime, I have found some example files and this clarified things (it was simpler than I imagined).

Anyway, a related question:

Currently I am exploiting cmakes --graphviz output. Would it be possible - or are there any considerations - to mirror this functionality for the query interface? It shouldn’t be too hard considering the yet existing output format as json reply files. Both outputs should probably remain separate, but as a whole would allow for extending this kind of information from cmakes configure into the build domain.