Duplicate entries in compile_commands.json
I noticed that in one of my projects the generated
compile_commands.json file contains two entries for each
cpp file. Even more interesting, the compile commands of sibling entries are always slightly different; the second entry typically has some (but not all) of the compiler flags and includes missing.
I can not reproduce this behavior with other projects. And unfortunately, the project that causes trouble is pretty complex and so far I have no idea how to approach reducing it to a MWE. Thus before investing time into figuring out the cause, I thought of asking here if this perhaps is a known misconfiguration problem or a known bug in CMake.
(Environment: Ubuntu 16.04, CMake 3.10rc5)