File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -386,12 +386,16 @@ endif()
386386# Configure SIMD. AVX implies SSE 4.2.
387387
388388if (OPENVDB_SIMD STREQUAL "AVX" )
389- add_compile_options ("$<$<COMPILE_LANGUAGE:CXX>:-mavx>" )
390- add_compile_options ("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>" )
389+ if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" )
390+ add_compile_options ("$<$<COMPILE_LANGUAGE:CXX>:-mavx>" )
391+ add_compile_options ("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>" )
392+ endif ()
391393 add_compile_definitions ("$<$<COMPILE_LANGUAGE:CXX>:OPENVDB_USE_AVX>" )
392394 add_compile_definitions ("$<$<COMPILE_LANGUAGE:CXX>:OPENVDB_USE_SSE42>" )
393395elseif (OPENVDB_SIMD STREQUAL "SSE42" )
394- add_compile_options ("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>" )
396+ if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" )
397+ add_compile_options ("$<$<COMPILE_LANGUAGE:CXX>:-msse4.2>" )
398+ endif ()
395399 add_compile_definitions ("$<$<COMPILE_LANGUAGE:CXX>:OPENVDB_USE_SSE42>" )
396400endif ()
397401
Original file line number Diff line number Diff line change 1+ OpenVDB:
2+ - Bug Fixes:
3+ Fixed a compilation error that would be encountered when attempting to
4+ enable the SSE4.2 or AVX SIMD options on non-x86 based platforms.
You can’t perform that action at this time.
0 commit comments