cppalliance / mrdocs

MrDocs: A Clang/LLVM tool for building reference documentation from C++ code and javadoc comments.
https://mrdocs.com
Other
66 stars 16 forks source link

Investigate effects of `output` in the compilation database #581

Open alandefreitas opened 1 month ago

alandefreitas commented 1 month ago

The JSON Compilation Database has entries with the directory, file, arguments, command, and output keys.

The directory and file keys are mandatory, as are the arguments or command keys.

On the other hand, the output key is not mandatory and is typically left unset in our tests. It labels the output generated during the compilation process and can be useful for distinguishing different processing modes of the same input file.

In my experience, I've rarely encountered a compilation database where the output key was set. If the same file is compiled twice with different parameters, it usually appears twice in the database without any output key to distinguish them. This reassures us that our current practices align with typical scenarios.

Some multi-config generators could use it. The only multi-config generator we ever use is Visual Studio, but it doesn't generate a compilation database at all. The other one is XCode, but I am still determining what it does.

Even after figuring this out, we'd have to consider if it would have any implications for MrDocs or if it's even possible to have any implications different from what we already do for duplicate files with no output key.