fix: guard SSE flags for arm64 build #14
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When installing simpleimageio via pip on an Apple M1 (arm64) MacBook,
the build failed because the CMake configuration unconditionally enabled
x86-specific SSE compiler flags (
-msse4.1and-mpclmul).These flags are not supported on non-x86 systems and cause compilation
errors such as:
This PR updates
Core/CMakeLists.txtto skip adding the x86‐specificcompiler flags
-msse4.1and-mpclmulon non-x86 platforms(e.g. macOS arm64).
These flags caused build failures on Apple Silicon (tested with M1).
Changes
CMAKE_SYSTEM_PROCESSOR.-msse4.1/-mpclmulonly when building for x86_64/AMD64.FPNG_NO_SSE=1when building on other architectures.With this change simpleimageio now builds successfully on macOS arm64.