These adaptations allow builds using Clang on recent versions of macOS (tested on Apple silicon):
An updated and adapted version of Discregrid is used (see Discregrid#19). If the pull requests are accepted, CMakeLists.txt has to be updated to point to the original repository again.
Clang seems to mistake some version files for headers, so these are given an extension.
The optimization flag -mcpu=apple-m1 is used for Apple silicon, for which -march=native is not yet supported.
OpenGL is deprecated for years on macOS, but still supported, so the corresponding warnings are silenced.
_NSGetExecutablePath is used to find program paths on macOS.
Recent versions of CMake automatically determine the correct flags for OpenMP and provide a target to link against. Nevertheless, Clang does not include an OpenMP implementation on macOS by default, but the user can easily install a build of LLVM libomp (e.g. via Homebrew) to be shared by all projects requiring OpenMP which is then detected by CMake.
The changes are similar to those in #123, but based on the version of commit 67cea44, which is used and wrapped in SPlisHSPlasH. For this purpose, they could be pulled into a new branch.
These adaptations allow builds using Clang on recent versions of macOS (tested on Apple silicon):
CMakeLists.txt
has to be updated to point to the original repository again.-mcpu=apple-m1
is used for Apple silicon, for which-march=native
is not yet supported._NSGetExecutablePath
is used to find program paths on macOS.The changes are similar to those in #123, but based on the version of commit 67cea44, which is used and wrapped in SPlisHSPlasH. For this purpose, they could be pulled into a new branch.