midi2_device: gate -Wno-type-limits to GCC/Clang for IAR build

iccarm rejects -Wno-type-limits, breaking the hil-hfp-iar CI matrix
(stm32l412nucleo, stm32f746disco, lpcxpresso43s67). Apply the same
CMAKE_C_COMPILER_ID guard used in hw/bsp/family_support.cmake so IAR
builds skip the flag without losing the GCC warning suppression.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
hathach
2026-05-29 23:59:15 +07:00
parent 3be8226b18
commit 24700ea8ef

View File

@ -30,4 +30,6 @@ target_include_directories(${PROJECT_NAME} PUBLIC
family_configure_device_example(${PROJECT_NAME} noos)
# Suppress pre-existing warning in usbd.c (uint8_t comparison always true/false)
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-type-limits)
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-type-limits)
endif()