# one bundle target for multiple targets

**URL:** https://discourse.cmake.org/t/one-bundle-target-for-multiple-targets/3836
**Category:** Code
**Created:** [July 26, 2021, 9:12pm UTC](https://discourse.cmake.org/t/one-bundle-target-for-multiple-targets/3836 "2021-07-26T21:12:26Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![eri0](https://discourse.cmake.org/user_avatar/discourse.cmake.org/eri0/32/733_2.png) [@eri0](https://discourse.cmake.org/u/eri0)
#### Post date: [July 26, 2021, 9:12pm UTC](https://discourse.cmake.org/t/one-bundle-target-for-multiple-targets/3836/1 "2021-07-26T21:12:26Z")

</div>

Hi, I have a project that produces 8 executable binaries, each as it’s own target.

Is it possible to have a “bundle-like” pseudo target I could use to build these 8 binaries that are built with `add_executable` ? Currently each of them build fine, but I would like to be able to have a target that builds all 8!

---

<div class="post-metadata">

### Author: ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)
#### Post date: [July 26, 2021, 9:16pm UTC](https://discourse.cmake.org/t/one-bundle-target-for-multiple-targets/3836/2 "2021-07-26T21:16:01Z")

</div>

Create a [custom target](https://cmake.org/cmake/help/latest/command/add_custom_target.html) and add [dependencies](https://cmake.org/cmake/help/latest/command/add_dependencies.html) over your targets.

---

<div class="post-metadata">

### Author: ![eri0](https://discourse.cmake.org/user_avatar/discourse.cmake.org/eri0/32/733_2.png) [@eri0](https://discourse.cmake.org/u/eri0)
#### Post date: [July 26, 2021, 9:17pm UTC](https://discourse.cmake.org/t/one-bundle-target-for-multiple-targets/3836/3 "2021-07-26T21:17:55Z")

</div>

so just

```auto
add_custom_target(tools)
add_dependencies(tools toolA toolB toolC toolD)

```

Just like this?

---

<div class="post-metadata">

### Author: ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)
#### Post date: [July 27, 2021, 8:36am UTC](https://discourse.cmake.org/t/one-bundle-target-for-multiple-targets/3836/4 "2021-07-27T08:36:18Z")

</div>

Yes.

---

<div class="post-metadata">

### Author: ![eri0](https://discourse.cmake.org/user_avatar/discourse.cmake.org/eri0/32/733_2.png) [@eri0](https://discourse.cmake.org/u/eri0)
#### Post date: [July 27, 2021, 10:51am UTC](https://discourse.cmake.org/t/one-bundle-target-for-multiple-targets/3836/5 "2021-07-27T10:51:17Z")

</div>

Thanks, it worked
