diff --git a/cmake/arch.cmake b/cmake/arch.cmake index e92b1dc0e98db9f3ecfadb6064b15eae89c62085..d1126312db3c1922801ced49da265ef575abc362 100644 --- a/cmake/arch.cmake +++ b/cmake/arch.cmake @@ -14,3 +14,15 @@ if (${HAVE_BYTE_ORDER_BIG_ENDIAN} OR message (FATAL_ERROR "Tarantool currently only supports little-endian hardware") message (FATAL_ERROR "with unaligned word access.") endif() + +# +# Bug in CMake, Darwin always detect on i386 +# Fixed with check types +# +if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + if (CMAKE_SIZEOF_VOID_P MATCHES 8) + set(CMAKE_SYSTEM_PROCESSOR "x86_64") + else(CMAKE_SIZEOF_VOID_P MATCHES 8) + set(CMAKE_SYSTEM_PROCESSOR "x86") + endif(CMAKE_SIZEOF_VOID_P MATCHES 8) +endif()