# Is it possible to create alias for \`add\_custom\_target()\`?

**URL:** https://discourse.cmake.org/t/is-it-possible-to-create-alias-for-add-custom-target/13842
**Category:** Development
**Created:** [March 27, 2025, 6:45pm UTC](https://discourse.cmake.org/t/is-it-possible-to-create-alias-for-add-custom-target/13842 "2025-03-27T18:45:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![leha-bot](https://discourse.cmake.org/user_avatar/discourse.cmake.org/leha-bot/32/921_2.png) [@leha-bot](https://discourse.cmake.org/u/leha-bot)
#### Post date: [March 27, 2025, 6:45pm UTC](https://discourse.cmake.org/t/is-it-possible-to-create-alias-for-add-custom-target/13842/1 "2025-03-27T18:45:36Z")

</div>

And if this ability absent, should we support it for complementary support of pretty “double-coloned” (namespace::target) names?

---

<div class="post-metadata">

### Author: ![benthevining](https://discourse.cmake.org/user_avatar/discourse.cmake.org/benthevining/32/1924_2.png) [@benthevining](https://discourse.cmake.org/u/benthevining)
#### Post date: [March 28, 2025, 5:22am UTC](https://discourse.cmake.org/t/is-it-possible-to-create-alias-for-add-custom-target/13842/2 "2025-03-28T05:22:21Z")

</div>

Where would you want to use such an alias? Aliases aren’t added to IDEs, they’re purely a CMake abstraction, and CMake code outside a project rarely needs to refer to a project’s custom targets.

---

<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 20, 2025, 2:35am UTC](https://discourse.cmake.org/t/is-it-possible-to-create-alias-for-add-custom-target/13842/3 "2025-07-20T02:35:35Z")

</div>

It’s not possible to link or export them, so aliasing seems to be of quite limited utility.
