# Why add\_dependencies() doesn't have any effect?

**URL:** https://discourse.cmake.org/t/why-add-dependencies-doesnt-have-any-effect/6131
**Category:** Usage
**Created:** [July 22, 2022, 4:07pm UTC](https://discourse.cmake.org/t/why-add-dependencies-doesnt-have-any-effect/6131 "2022-07-22T16:07:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![yurivict](https://discourse.cmake.org/user_avatar/discourse.cmake.org/yurivict/32/2615_2.png) [@yurivict](https://discourse.cmake.org/u/yurivict)
#### Post date: [July 22, 2022, 4:07pm UTC](https://discourse.cmake.org/t/why-add-dependencies-doesnt-have-any-effect/6131/1 "2022-07-22T16:07:02Z")

</div>

The [EternalTerminal](https://github.com/MisterTea/EternalTerminal) project contains the add\_dependencies statement [here](https://github.com/MisterTea/EternalTerminal/blob/master/CMakeLists.txt#L391) but the generated Makefile doesn’t contain the line that the target et-lib depends on the target generated-code.

Docs say that add\_dependencies appeared in 3.3  
This project’s CMakeLists.txt has `cmake_minimum_required(VERSION 3.0.2)`. I think that this means that cmake only has features enabled that were available in version 3.0.2 (?)

Why then add\_dependencies() doesn’t cause an error and doesn’t work?

Is this a bug in cmake that it just ignores add\_dependencies() ?

cmake-3.23.2

FreeBSD 13.1

---

<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: [July 22, 2022, 5:08pm UTC](https://discourse.cmake.org/t/why-add-dependencies-doesnt-have-any-effect/6131/2 "2022-07-22T17:08:01Z")

</div>

It is certainly odd. Could you try to distill it down to a simpler case that still shows the problem?
