Skip to content

Commit

Permalink
gyro-fft: Disable asm-operand-widths warning on apple silicon. The wa…
Browse files Browse the repository at this point in the history
…rning is caused by unused functions only. As with compiling for x86, the functions containing assembly never get used, but since the apple silicon is also an ARM target, they trigger a warning.
  • Loading branch information
ThomasDebrunner authored and dagar committed Nov 19, 2021
1 parent 24090b7 commit fb54324
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/gyro_fft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ if(${PX4_PLATFORM} MATCHES "NuttX")
add_compile_options(-DARM_MATH_DSP)
endif()

# Disable 32-bit assembly warnings on apple silicon. Triggered by unused code only.
if(${PX4_PLATFORM} MATCHES "posix" AND APPLE AND ${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm64")
add_compile_options(-Wno-asm-operand-widths)
endif()

add_compile_options($<$<COMPILE_LANGUAGE:C>:-Wno-nested-externs>)

px4_add_module(
Expand Down

0 comments on commit fb54324

Please sign in to comment.