# Matlab Apple Silicon beta

**URL:** <https://discourse.cmake.org/t/matlab-apple-silicon-beta/6356>\
**Category:** Code\
**Tags:** os:macos\
**Created:** [August 26, 2022, 3:29pm UTC](https://discourse.cmake.org/t/matlab-apple-silicon-beta/6356 "2022-08-26T15:29:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scivision](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@scivision](https://discourse.cmake.org/u/scivision)\
**Post date:** [August 26, 2022, 3:29pm UTC](https://discourse.cmake.org/t/matlab-apple-silicon-beta/6356/1 "2022-08-26T15:29:26Z")

</div>

Mathworks has an [Apple Silicon beta for Matlab](https://blogs.mathworks.com/matlab/2022/05/05/exploring-the-matlab-beta-for-native-apple-silicon/). They’ve [mentioned](https://blogs.mathworks.com/matlab/?p=50#reply_2449270) also possible upcoming ARM64 support for other operating systems. For now, to test Matlab for Apple Silicon, I made this small patch to CMake’s factory FindMatlab.cmake.  
Since we don’t know if these are the final naming schemes, or if September’s typical release schedule will bring official Apple Silicon support, I haven’t yet done a CMake MR.

I have general C, C++, Fortran Matlab MEX and Matlab Engine CMake examples at [GitHub - scivision/matlab-cmake-mex: CMake and Matlab MEX producing accelerated Matlab code](https://github.com/scivision/matlab-cmake-mex)

```nohighlight
707a710,711
> elseif(APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
> set(_matlab_mex_extension "mexmaca64")
1744c1748,1752
< set(_matlab_bin_suffix_64bits "i64")
---
> if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
> set(_matlab_bin_suffix_64bits "a64")
> else()
> set(_matlab_bin_suffix_64bits "i64")
> endif()

```

---

<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:** [August 26, 2022, 4:10pm UTC](https://discourse.cmake.org/t/matlab-apple-silicon-beta/6356/2 "2022-08-26T16:10:46Z")

</div>

Thanks. I think an MR that can be used once it is in place is fine for now. Note that it will probably be closed with `triage:blocked` and/or `triage:expired` or the like just to keep the MR queue clean (but the MR still findable when the time does finally come).

---

<div class="post-metadata">

**Author:** ![scivision](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@scivision](https://discourse.cmake.org/u/scivision)\
**Post date:** [August 26, 2022, 11:04pm UTC](https://discourse.cmake.org/t/matlab-apple-silicon-beta/6356/3 "2022-08-26T23:04:38Z")

</div>

OK thanks I think I’ll wait as some of the patched code will be removed for the release as it works around a bug in the Matlab beta.
