# How to determine which architectures are available (Apple M1)?

**URL:** https://discourse.cmake.org/t/how-to-determine-which-architectures-are-available-apple-m1/2401
**Category:** Code
**Created:** [December 20, 2020, 7:34pm UTC](https://discourse.cmake.org/t/how-to-determine-which-architectures-are-available-apple-m1/2401 "2020-12-20T19:34:00Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [December 23, 2020, 10:57pm UTC](https://discourse.cmake.org/t/how-to-determine-which-architectures-are-available-apple-m1/2401/9 "2020-12-23T22:57:32Z")

</div>

I don’t think a new variable is needed. It looks like you can set `CMAKE_OSX_ARCHITECTURES` to `$(ARCHS_STANDARD)` if you want a universal build where available for macOS. CMake’s default behavior has always been to build for the native host architecture only. There was a fair amount of investigation and work that went into keeping that behavior with Xcode 12 and Apple Silicon to avoid various problems. See [issue 20893](https://gitlab.kitware.com/cmake/cmake/-/issues/20893) for the fairly detailed discussions and related information.

Depending on what version of macOS and Xcode you are running, you may also need to set `CMAKE_OSX_DEPLOYMENT_TARGET` to be able to run your built apps. I have the situation locally where I build with Xcode 12.3 on an intel running macOS 10.15. If I don’t specify `CMAKE_OSX_DEPLOYMENT_TARGET`, I end up building a valid binary that I can’t run on my machine.

---

_[View the full topic](https://discourse.cmake.org/t/how-to-determine-which-architectures-are-available-apple-m1/2401)._
