Graphviz output of per target files show first level dependencies only
When generating the dependency dot files with --graphviz parameter enabled, the resulting overall dependency graph is fine. However, by enabling GRAPHVIZ_GENERATE_PER_TARGET (which is default) the per target files do only contain the first level dependencies, irrespective of PRIVATE or PUBLIC dependency definition.
Minimalistic example to reproduce:
cmake_minimum_required(VERSION 3.5)
project(CMakeTest LANGUAGES CXX)
add_library(Base some_source.cpp)
add_library(IntermediateA some_source.cpp)
target_link_libraries(IntermediateA PUBLIC Base)
add_library(IntermediateB some_source.cpp)
target_link_libraries(IntermediateB PUBLIC Base)
add_library(HighLevel some_source.cpp)
target_link_libraries(HighLevel PUBLIC IntermediateA IntermediateB)
add_executable(TestProgram some_source.cpp)
target_link_libraries(TestProgram PUBLIC HighLevel)
For example the dependency shown for TestProgram is only pointing to HighLevel but no further part of the graph is shown. I am using cmake version 3.17.3 and I am sure, that with older cmake versions the complete graph was included.
EDIT: I checked older versions and 3.16.5 was fine, while 3.17.2 was bad. I conclude it was a change made in between.
Edited by Stephan Rohmen