# add\_custom\_custom multiple output and multiple directories.

**URL:** <https://discourse.cmake.org/t/add-custom-custom-multiple-output-and-multiple-directories/15474>\
**Category:** Usage\
**Created:** [January 22, 2026, 11:10pm UTC](https://discourse.cmake.org/t/add-custom-custom-multiple-output-and-multiple-directories/15474 "2026-01-22T23:10:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [February 9, 2026, 2:42am UTC](https://discourse.cmake.org/t/add-custom-custom-multiple-output-and-multiple-directories/15474/2 "2026-02-09T02:42:25Z")

</div>

Skip `IMPLICIT_DEPENDS`. It is hacky and inaccurate anyways. Instead, teach the generator to write a `DEPFILE` and use that to communicate the dependencies. See [this MR](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10624) for adding support to VTK’s code generators.

`DEPFILE` is supported by every generator AFAIK.

---

_[View the full topic](https://discourse.cmake.org/t/add-custom-custom-multiple-output-and-multiple-directories/15474)._
