gpu / JOCL

Java bindings for OpenCL
http://www.jocl.org
Other
187 stars 33 forks source link

edited CMakeLists.txt for arm64 macOS #34

Closed psobolewskiPhD closed 3 years ago

psobolewskiPhD commented 3 years ago

This is regarding compiling JOCL on Apple Silicon M1 (arm64) Macs. See https://github.com/gpu/JOCL/issues/32 I've edited the CMakeList.txt to check the CMake setting: CMAKE_OSX_ARCHITECTURES and if it's "arm64" to set JOCL_TARGET_ARCH to "arm64" based on this. (In CMake the Env variables

CMAKE_APPLE_SILICON_PROCESSOR
CMAKE_OSX_ARCHITECTURES

are "arm64" on Apple Silicon M1 Macs)

gpu commented 3 years ago

Thanks. Of course, I cannot really test this on the actual target, but at least checked that it does not seem to interfere with the current windows build. (And, due to the CMAKE_OSX_ARCHITECTURES being very OS-specific, it's unlikely to break anything on Linux).