I’m using cmake 3.26.3. I have three targets A, B, and C. And I have target_link_libraries(A PRIVATE B PUBLIC C). I use the file api and traverse to the codemodel object for target A, and it’s dependencies field is completely missing. It’s not even set to an empty list, the key just isn’t present in the codemodel target object. If I look at the includes field for the compileGroups, then I do see lots of entries like:
{
"backtrace" : 41,
"path" : "some-include-dir"
},
And backtrace 41 points to a call to target_link_libraries. How do I get a target id from this? Reading the documentation it looks like it’s supposed to be in the dependencies field, but it isn’t.