COMP: Forward CMAKE_APPLE_SILICON_PROCESSOR#2409
COMP: Forward CMAKE_APPLE_SILICON_PROCESSOR#2409thewtex merged 1 commit intoInsightSoftwareConsortium:masterfrom
Conversation
|
Not sure I get the point of the existence of |
Here https://cmake.org/cmake/help/v3.19/release/3.19.html is some information: Apple Silicon is now supported (since CMake 3.19.2): 3.19.2
|
mi@mis-Mac-mini ~ % clang++ --target="x86_64-apple-macos10.14" test1.cpp mi@mis-Mac-mini ~ % clang++ test1.cpp |
|
Ah, so |
Forward CMAKE_APPLE_SILICON_PROCESSOR variable to external cmake configuration commands (Eigen3 and FFTW).
This fixes configuration for x86_64 on Apple Silicon, if CMAKE_APPLE_SILICON_PROCESSOR variable was set by user (value should be x86_64 or arm64).
Theoretically, for cross-compile setups, specially on other architectures, more variables should be forwarded, IMHO, but Eigen3 is header library, this is required only to pass correct architecture to "try compile" cmake's tests, AFAIK. And internal FFTW build is marked as non-production experimental build, so probably it is OK. Note: i didn't test FFTW build on Apple Silicon, but i think it is straightforward.
Let me know if you think CMAKE_OSX_ARCHITECTURES or other variables should be added too, so temporary set WIP.
S. comments to #2391
CC @seanm
Edit:
have tried "internal" FFTW builds (both variants, float and double) with CMAKE_APPLE_SILICON_PROCESSOR x86_64 on Apple Silicon, they are OK.
This variable exists in Cmake >= 3.19.2, BTW.