Skip to content

Commit

Permalink
Try setting the CMAKE_OSX_ARCHITECTURES variable
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Oct 27, 2023
1 parent f731651 commit 2b5afc4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeBuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ def run(self):
"-DPYTHON_EXECUTABLE={}".format(sys.executable),
"-DUSE_PYTHON_CASADI={}".format("TRUE" if use_python_casadi else "FALSE"),
]
# check if CIBUILDWHEEL environment variable is set to 1
# if so, we are building a wheel and should enable the arm64 architecture.
# note: cross-compilation on macOS is enabled via Xcode.
if os.getenv("CIBUILDWHEEL", "0") == "1":
cmake_args.append("-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64")

if self.suitesparse_root:
cmake_args.append(
"-DSuiteSparse_ROOT={}".format(os.path.abspath(self.suitesparse_root))
Expand Down

0 comments on commit 2b5afc4

Please sign in to comment.