# Building Nasm files with Xcode

**URL:** https://discourse.cmake.org/t/building-nasm-files-with-xcode/7934
**Category:** Development
**Tags:** os:macos, gen:xcode
**Created:** [April 19, 2023, 4:57pm UTC](https://discourse.cmake.org/t/building-nasm-files-with-xcode/7934 "2023-04-19T16:57:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![amyspark](https://discourse.cmake.org/user_avatar/discourse.cmake.org/amyspark/32/3360_2.png) [@amyspark](https://discourse.cmake.org/u/amyspark)
#### Post date: [April 19, 2023, 4:57pm UTC](https://discourse.cmake.org/t/building-nasm-files-with-xcode/7934/1 "2023-04-19T16:57:50Z")

</div>

Hi all,

I just ported a couple files to the `ASM_NASM` language. But I noticed that, when using the Xcode generator, there are no build rules for the .asm files (explicitFileType is `sourcecode`).

Looking into the mailing list archives, I found this thread: [https://cmake.org/pipermail/cmake/2018-October/068332.html](https://cmake.org/pipermail/cmake/2018-October/068332.html). When forcing the suggested correct file type `sourcecode.nasm`, Xcode crafts a (wrong) build rule out of the blue and crashes because it doesn’t find Nasm at the expected location `$(DEVELOPER_BIN)`.

Even further digging shows that `ASM_NASM` [may be poorly documented](https://stackoverflow.com/questions/56420035/how-to-use-cmake-to-build-binaries-with-nasm), and from a cursory look at cmGlobalXCodeGenerator.cxx I concluded that the build rule was simply never generated for this language.

Can someone confirm my suspicions? Would it be possible to fix the generator?

---

<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: [April 24, 2023, 5:33am UTC](https://discourse.cmake.org/t/building-nasm-files-with-xcode/7934/2 "2023-04-24T05:33:03Z")

</div>

> [@amyspark](#):
>
> Would it be possible to fix the generator?

Probably, but we would need to know what to do properly.
