Fix build error with WITH_CYCLES_KERNEL_NATIVE_ONLY on macOS Arm
-march=native is not supported for all architectures.
This commit is contained in:
parent
72fb92ded8
commit
cd9ebc816e
|
@ -36,8 +36,13 @@ if(WITH_CYCLES_NATIVE_ONLY)
|
|||
)
|
||||
|
||||
if(NOT MSVC)
|
||||
string(APPEND CMAKE_CXX_FLAGS " -march=native")
|
||||
set(CYCLES_KERNEL_FLAGS "-march=native")
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_march_native "-march=native")
|
||||
if(_has_march_native)
|
||||
set(CYCLES_KERNEL_FLAGS "-march=native")
|
||||
else()
|
||||
set(CYCLES_KERNEL_FLAGS "")
|
||||
endif()
|
||||
unset(_has_march_native)
|
||||
else()
|
||||
if(NOT MSVC_NATIVE_ARCH_FLAGS)
|
||||
TRY_RUN(
|
||||
|
|
Loading…
Reference in New Issue