# Using Intentdefinition Compiler using cmake for code generation

**URL:** https://discourse.cmake.org/t/using-intentdefinition-compiler-using-cmake-for-code-generation/10229
**Category:** Code
**Tags:** os:macos, gen:xcode
**Created:** [February 29, 2024, 5:22am UTC](https://discourse.cmake.org/t/using-intentdefinition-compiler-using-cmake-for-code-generation/10229 "2024-02-29T05:22:53Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Vipul\_Gupta](https://discourse.cmake.org/user_avatar/discourse.cmake.org/vipul_gupta/32/3948_2.png) [@Vipul\_Gupta](https://discourse.cmake.org/u/Vipul_Gupta)
#### Post date: [February 29, 2024, 5:22am UTC](https://discourse.cmake.org/t/using-intentdefinition-compiler-using-cmake-for-code-generation/10229/1 "2024-02-29T05:22:53Z")

</div>

In Xcode, when we create an intent definition file, a corresponding swift file gets generated for the intent defined in the intent definition file. This happens with the help of IntentDefinition Compiler , which can be seen in the build settings of a native xcode project.

 ![image](https://discourse.cmake.org/uploads/default/original/2X/2/21a5528f5dab846962f1ff085161c3a0ab053ef0.png)

I am generating an xcode project using cmake and I have an Intent definition file for which I need the generated swift code. But I m not aware of how to specify this Intent Definition Compiler for swift or Is this even available feature using cmake. Can someone help on how to add this to my generated Xcode project using cmake, so that the required intent handling code can be generated?

---

<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: [March 29, 2024, 11:01am UTC](https://discourse.cmake.org/t/using-intentdefinition-compiler-using-cmake-for-code-generation/10229/2 "2024-03-29T11:01:12Z")

</div>

Maybe this is something that [`XCODE_ATTRIBUTE_*`](https://cmake.org/cmake/help/latest/prop_tgt/XCODE_ATTRIBUTE_an-attribute.html) properties can control?

---

<div class="post-metadata">

### Author: ![siddmohsin](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@siddmohsin](https://discourse.cmake.org/u/siddmohsin)
#### Post date: [May 15, 2024, 11:45am UTC](https://discourse.cmake.org/t/using-intentdefinition-compiler-using-cmake-for-code-generation/10229/3 "2024-05-15T11:45:26Z")

</div>

hi @ben.boeckel there is no such property in CMake listed here

[https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html](https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html)

I mean there is no such property listed there which resembles with Srikit.

What should we do in this case ?

---

<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: [June 11, 2024, 4:57pm UTC](https://discourse.cmake.org/t/using-intentdefinition-compiler-using-cmake-for-code-generation/10229/4 "2024-06-11T16:57:54Z")

</div>

It’s a “pattern” property; the `*` part is replaced with the Xcode attribute you want it to manage.

---

<div class="post-metadata">

### Author: ![siddmohsin](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@siddmohsin](https://discourse.cmake.org/u/siddmohsin)
#### Post date: [August 2, 2024, 4:48am UTC](https://discourse.cmake.org/t/using-intentdefinition-compiler-using-cmake-for-code-generation/10229/5 "2024-08-02T04:48:06Z")

</div>

@ben.boeckel Sorry asking one rookie question again. And where I can find all xcode properties available. Does Apple/xcode team manages these properties somewhere ? Any idea ?

---

<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 19, 2025, 2:06pm UTC](https://discourse.cmake.org/t/using-intentdefinition-compiler-using-cmake-for-code-generation/10229/6 "2025-07-19T14:06:00Z")

</div>

I’m not aware of any Apple documentation for such things, sorry.
