From 6a61d5a946c84d37266a08bbfd90e34849e13517 Mon Sep 17 00:00:00 2001 From: Guillaume Gardet Date: Wed, 29 Apr 2020 12:03:44 +0200 Subject: [PATCH] Fix aarch64/arm detection --- CMake/unix_config.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMake/unix_config.cmake b/CMake/unix_config.cmake index 0de80e38a9..7e794cc7dc 100644 --- a/CMake/unix_config.cmake +++ b/CMake/unix_config.cmake @@ -7,11 +7,11 @@ 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-linux-gnueabihf") + 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") add_definitions(-DRASPBERRY_PI) - elseif(${MACHINE} MATCHES "aarch64-linux-gnu") + elseif(${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 "powerpc64(le)?-linux-gnu") @@ -21,7 +21,7 @@ macro(os_set_flags) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mssse3") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mssse3") set(LRS_TRY_USE_AVX true) - endif(${MACHINE} MATCHES "arm-linux-gnueabihf") + endif(${MACHINE} MATCHES "arm-*") if(BUILD_WITH_OPENMP) find_package(OpenMP REQUIRED)