# add\_dependencies called with incorrect number of arguments

**URL:** https://discourse.cmake.org/t/add-dependencies-called-with-incorrect-number-of-arguments/13611
**Category:** Development
**Created:** [February 20, 2025, 10:24am UTC](https://discourse.cmake.org/t/add-dependencies-called-with-incorrect-number-of-arguments/13611 "2025-02-20T10:24:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nmnobre](https://discourse.cmake.org/user_avatar/discourse.cmake.org/nmnobre/32/5356_2.png) [@nmnobre](https://discourse.cmake.org/u/nmnobre)
#### Post date: [February 20, 2025, 10:24am UTC](https://discourse.cmake.org/t/add-dependencies-called-with-incorrect-number-of-arguments/13611/1 "2025-02-20T10:24:13Z")

</div>

The [documentation](https://cmake.org/cmake/help/latest/command/add_dependencies.html) for `add_dependencies` seems to suggest `add_dependencies(my_amazing_target)` is valid syntax, yet CMake complains it’s missing arguments?

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [February 20, 2025, 1:32pm UTC](https://discourse.cmake.org/t/add-dependencies-called-with-incorrect-number-of-arguments/13611/2 "2025-02-20T13:32:29Z")

</div>

I opened [CMake MR 10370](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/10370) to fix the documentation, thanks.

---

<div class="post-metadata">

### Author: ![nmnobre](https://discourse.cmake.org/user_avatar/discourse.cmake.org/nmnobre/32/5356_2.png) [@nmnobre](https://discourse.cmake.org/u/nmnobre)
#### Post date: [February 20, 2025, 1:44pm UTC](https://discourse.cmake.org/t/add-dependencies-called-with-incorrect-number-of-arguments/13611/3 "2025-02-20T13:44:53Z")

</div>

Oh! So it’s the docs that are wrong? I was hoping we could fix the implementation instead. 😇

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [February 20, 2025, 1:53pm UTC](https://discourse.cmake.org/t/add-dependencies-called-with-incorrect-number-of-arguments/13611/4 "2025-02-20T13:53:09Z")

</div>

I’ve opened [CMake Issue 26713](https://gitlab.kitware.com/cmake/cmake/-/issues/26713) to propose allowing calls with no dependencies listed.
