From ab26bf3c66e659cd0c58ada109825f699cdd2113 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Wed, 23 Nov 2022 06:55:45 +0100 Subject: [PATCH] chore(compilation): Silence some warning on apple silicon (#2712) When compiling `simu`, `clang` complains about all the StdPeriph headers declaring assembly with invalid operand width. --- cmake/toolchain/native.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/toolchain/native.cmake b/cmake/toolchain/native.cmake index 6c8bd8ba4..5627e9484 100644 --- a/cmake/toolchain/native.cmake +++ b/cmake/toolchain/native.cmake @@ -1,2 +1,6 @@ # Native toolchain +if(APPLE) + set(CMAKE_C_FLAGS "-Wno-asm-operand-widths -Wno-deprecated-declarations") + set(CMAKE_CXX_FLAGS "-Wno-asm-operand-widths -Wno-deprecated-declarations") +endif()