Skip to content

Commit

Permalink
Merge pull request #6321 from ggardet/master
Browse files Browse the repository at this point in the history
Fix aarch64/arm detection
  • Loading branch information
ev-mp authored May 28, 2020
2 parents 457ff1f + 6a61d5a commit d2c8dd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMake/unix_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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)
Expand Down

0 comments on commit d2c8dd3

Please sign in to comment.