Skip to content

Commit

Permalink
Disable OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX when building on arm64 macOS
Browse files Browse the repository at this point in the history
For some reason, the compile check for detecting inline AVX support does
not correctly disable OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX when building
on arm64 macOS using clang (the check does work correctly on aarch64 Linux
using gcc). This change hardcodes OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX to
always be false when the system is detected as arm64 macOS. This change
is necessary to allow building on arm64 macOS to complete successfully.

Signed-off-by: Yining Karl Li <betajippity@gmail.com>
  • Loading branch information
betajippity authored and meshula committed Jul 5, 2020
1 parent 01117eb commit 67053eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions OpenEXR/config/CMakeLists.txt
Expand Up @@ -47,6 +47,9 @@ set(OPENEXR_IMF_HAVE_COMPLETE_IOMANIP TRUE)

if(APPLE)
set(OPENEXR_IMF_HAVE_DARWIN TRUE)
if (${CMAKE_OSX_ARCHITECTURES} MATCHES arm64)
set(OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX FALSE)
endif()
endif()

configure_file(OpenEXRConfig.h.in_cmake ${CMAKE_CURRENT_BINARY_DIR}/OpenEXRConfig.h)
Expand Down

0 comments on commit 67053eb

Please sign in to comment.