codemodel: targets include transitive dependencies
I'm trying to use information from the file api (codemodel) to reproduce the graph that CMake outputs via --graphviz=
. However, this is currently impossible as the target dependencies also include transitive dependencies and they are not marked as such in any way.
vs.
Generated from:
add_library(foo SHARED a.cc)
add_library(bar STATIC b.cc)
add_library(x STATIC c.cc)
add_library(mod MODULE c.cc)
add_library(obj OBJECT a.cc b.cc)
add_executable(main main.cc)
target_link_libraries(foo x)
target_link_libraries(x obj)
target_link_libraries(main foo bar)