diff --git a/CMake/unix_config.cmake b/CMake/unix_config.cmake index 5a187c7c7a..89272b8ee1 100644 --- a/CMake/unix_config.cmake +++ b/CMake/unix_config.cmake @@ -19,12 +19,12 @@ macro(os_set_flags) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch -Wno-multichar -Wsequence-point -Wformat -Wformat-security") execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE MACHINE) - if(${MACHINE} MATCHES "arm-*") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon -mfloat-abi=hard -ftree-vectorize -latomic") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -mfloat-abi=hard -ftree-vectorize -latomic") - elseif(${MACHINE} MATCHES "aarch64-*") + if(${MACHINE} MATCHES "arm64-*" OR ${MACHINE} MATCHES "aarch64-*") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mstrict-align -ftree-vectorize") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstrict-align -ftree-vectorize") + elseif(${MACHINE} MATCHES "arm-*") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon -mfloat-abi=hard -ftree-vectorize -latomic") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -mfloat-abi=hard -ftree-vectorize -latomic") elseif(${MACHINE} MATCHES "powerpc64(le)?-linux-gnu") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftree-vectorize") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftree-vectorize")