# custom targets not shown in my dependency graph

**URL:** https://discourse.cmake.org/t/custom-targets-not-shown-in-my-dependency-graph/624
**Category:** Usage
**Created:** [February 12, 2020, 6:31pm UTC](https://discourse.cmake.org/t/custom-targets-not-shown-in-my-dependency-graph/624 "2020-02-12T18:31:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hex](https://discourse.cmake.org/user_avatar/discourse.cmake.org/hex/32/363_2.png) [@hex](https://discourse.cmake.org/u/hex)
#### Post date: [February 12, 2020, 6:31pm UTC](https://discourse.cmake.org/t/custom-targets-not-shown-in-my-dependency-graph/624/1 "2020-02-12T18:31:44Z")

</div>

hello,

All my custom targets are missing in the graphviz dependency graph. The build has an executable that is dependent on them!

How can I generate a dependency graph for custom targets?

```auto
add_executable( dummyExe ${CMAKE_CURRENT_BINARY_DIR}/main )
add_custom_target( tgt1 )
add_dependencies( dummyExe tgt1 )

```

> a graphviz input file that will contain all the library and executable dependencies in the project

how do I read this? The graph only creates dependencies for targets of type EXECUTABLE?

Which kind of dependencies? It doesn’t seem to work when using `add_dependencies`. Does it only work for file level dependencies?

```auto
add_executable( dummyExe ${CMAKE_CURRENT_BINARY_DIR}/main )
add_library( dummyLib ${CMAKE_CURRENT_BINARY_DIR}/lib )
add_dependencies( dummyExe dummyLib )

```

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [February 12, 2020, 9:49pm UTC](https://discourse.cmake.org/t/custom-targets-not-shown-in-my-dependency-graph/624/2 "2020-02-12T21:49:21Z")

</div>

Support for this was added only a few months ago and should be available in the CMake 3.17.0-rc1 release candidate that came out today. [This comment](https://gitlab.kitware.com/cmake/cmake/issues/17960#note_632781) in the relevant issue notes the following:

> I have implemented proper support for custom targets in [MR 3766](https://gitlab.kitware.com/cmake/cmake/merge_requests/3766).
> 
> It is disabled by default (controlled through _GRAPHVIZ\_CUSTOM\_TARGETS_ ) because it tends to be noisy and people might generally want to combine it with _GRAPHVIZ\_IGNORE\_TARGETS_ .
