Sample CMakeLists.txt file:
cmake_minimum_required(VERSION 2.8)
add_executable(target0 test.cpp)
add_dependencies(target0 target1)
add_custom_target(target1 ALL
COMMAND echo hello
)
The output file “cmake –graphviz = test.dot.” will be:
digraph GG {
node [
fontsize = "12"
];
"node3" [label="target0" shape= "house"];
}
There is no trace of goal 1.
–graphviz=[file]
Generate a graphviz input file that will contain all the library and executable dependencies in the project. See the documentation for CMakeGraphVizOptions.cmake for more details.
So, according to me As you know, your custom target is neither – nor a library, nor an executable file that can be included in the result graph.
Whether the –graphviz option of CMake should be relied upon For custom goals?
Sample CMakeLists.txt file:
cmake_minimum_required(VERSION 2.8)
add_executable(target0 test.cpp)
add_dependencies(target0 target1)
add_custom_target(target1 ALL
COMMAND echo hello
)
The output file “cmake –graphviz = test.dot.” will be:
digraph GG {
node [
fontsize = "12"
];
"node3" [label="target0" shape= "house"];
}
There is no trace of target 1.
The CMake manual clearly states:
–graphviz=[file]
Generate a graphviz input file that will contain all the library and executable dependencies in the project. See the documentation for CMakeGraphVizOptions.cmake for more details.
So, as far as I know, your custom target is neither – nor Not a library, nor an executable file can be included in the result graph.