# Remove a target dependency?

**URL:** https://discourse.cmake.org/t/remove-a-target-dependency/10592
**Category:** Usage
**Created:** [April 5, 2024, 8:08pm UTC](https://discourse.cmake.org/t/remove-a-target-dependency/10592 "2024-04-05T20:08:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dabrahams](https://discourse.cmake.org/user_avatar/discourse.cmake.org/dabrahams/32/4265_2.png) [@dabrahams](https://discourse.cmake.org/u/dabrahams)
#### Post date: [April 5, 2024, 8:08pm UTC](https://discourse.cmake.org/t/remove-a-target-dependency/10592/1 "2024-04-05T20:08:14Z")

</div>

I’m looking for a workaround for [this bug](https://gitlab.kitware.com/cmake/cmake/-/issues/25869). CMake is creating a dependency on a non-existent file for no good reason I can see. The exact same custom command pattern has been used elsewhere with success. It seems unlikely to exist, but if there _were_ a way to remove an already-created target dependency it might get me out of a jam. Is there such a thing?

---

<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: [April 11, 2024, 4:48pm UTC](https://discourse.cmake.org/t/remove-a-target-dependency/10592/2 "2024-04-11T16:48:15Z")

</div>

No, there’s no way to remove a dependency of a target.
