Verified Commit f6d2525d authored by Willi Mutschler's avatar Willi Mutschler
Browse files

🍎 provisions for Apple Silicon package

parent cec47cc7
Pipeline #7076 passed with stage
in 6 minutes and 5 seconds
......@@ -1784,13 +1784,15 @@ ModelTree::matlab_arch(const string &mexext)
return "win32";
else if (mexext == "mexw64")
return "win64";
else if (mexext == "mexmaci")
else if (mexext == "mexmaci" || mexext == "mexmaca")
{
cerr << "32-bit MATLAB not supported on macOS" << endl;
exit(EXIT_FAILURE);
}
else if (mexext == "mexmaci64")
return "maci64";
else if (mexext == "mexmaca64")
return "maca64";
else
{
cerr << "ERROR: 'mexext' option to preprocessor incorrectly set, needed with 'use_dll'" << endl;
......@@ -1818,6 +1820,9 @@ ModelTree::findGccOnMacos()
else if (string global_gcc_path = "/usr/local/bin/gcc-" + macos_gcc_version;
filesystem::exists(global_gcc_path))
return global_gcc_path;
else if (string global_gcc_path = "/opt/homebrew/bin/gcc-" + macos_gcc_version;
filesystem::exists(global_gcc_path))
return global_gcc_path;
else
{
cerr << "ERROR: You must install gcc-" << macos_gcc_version
......@@ -1900,7 +1905,7 @@ ModelTree::compileMEX(const string &basename, const string &funcname, const stri
}
}
#ifdef __APPLE__
else if (mexext == "mexmaci64")
else if (mexext == "mexmaca64" || mexext == "mexmaci64")
{
compiler = findGccOnMacos();
flags << " -fno-common -Wl,-twolevel_namespace -undefined error -bundle";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment