fix(cmake): don't add Clang flags not supported in Apple toolchain

This commit is contained in:
Ivan Grokhotkov 2023-11-27 10:51:15 +01:00
parent 7f171f01b1
commit 1bd417ad68
No known key found for this signature in database
GPG Key ID: 1E050E141B280628

View File

@ -121,8 +121,10 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
list(APPEND compile_options "-Wno-c2x-extensions")
# warning on xMPU_SETTINGS for esp32s2 has size 0 for C and 1 for C++
list(APPEND compile_options "-Wno-extern-c-compat")
# warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1
list(APPEND compile_options "-Wno-single-bit-bitfield-constant-conversion")
if(NOT (CONFIG_IDF_TARGET_LINUX AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin"))
# warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1
list(APPEND compile_options "-Wno-single-bit-bitfield-constant-conversion")
endif()
endif()
# More warnings may exist in unit tests and example projects.