From 772edf879be75b121ac4e9ff21081495a623a64e Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 6 Nov 2024 22:13:05 +0700 Subject: fix iar build --- .../dual/host_hid_to_device_cdc/CMakeLists.txt | 22 ++++++++++++---------- examples/dual/host_hid_to_device_cdc/Makefile | 2 +- .../dual/host_info_to_device_cdc/CMakeLists.txt | 22 ++++++++++++---------- examples/dual/host_info_to_device_cdc/Makefile | 2 +- 4 files changed, 26 insertions(+), 22 deletions(-) (limited to 'examples') diff --git a/examples/dual/host_hid_to_device_cdc/CMakeLists.txt b/examples/dual/host_hid_to_device_cdc/CMakeLists.txt index a6557c2d0..54e36e3d3 100644 --- a/examples/dual/host_hid_to_device_cdc/CMakeLists.txt +++ b/examples/dual/host_hid_to_device_cdc/CMakeLists.txt @@ -28,13 +28,15 @@ target_include_directories(${PROJECT} PUBLIC family_configure_dual_usb_example(${PROJECT} noos) # due to warnings from Pico-PIO-USB -target_compile_options(${PROJECT} PUBLIC - -Wno-error=shadow - -Wno-error=cast-align - -Wno-error=cast-qual - -Wno-error=redundant-decls - -Wno-error=sign-conversion - -Wno-error=conversion - -Wno-error=sign-compare - -Wno-error=unused-function - ) +if (FAMILY STREQUAL rp2040) + target_compile_options(${PROJECT} PUBLIC + -Wno-error=shadow + -Wno-error=cast-align + -Wno-error=cast-qual + -Wno-error=redundant-decls + -Wno-error=sign-conversion + -Wno-error=conversion + -Wno-error=sign-compare + -Wno-error=unused-function + ) +endif () diff --git a/examples/dual/host_hid_to_device_cdc/Makefile b/examples/dual/host_hid_to_device_cdc/Makefile index 2c2168f5d..474ae9814 100644 --- a/examples/dual/host_hid_to_device_cdc/Makefile +++ b/examples/dual/host_hid_to_device_cdc/Makefile @@ -8,7 +8,7 @@ INC += \ EXAMPLE_SOURCE += $(wildcard src/*.c) SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) -CFLAGS += -Wno-error=cast-align -Wno-error=null-dereference +CFLAGS_GCC += -Wno-error=cast-align -Wno-error=null-dereference SRC_C += \ src/class/hid/hid_host.c \ diff --git a/examples/dual/host_info_to_device_cdc/CMakeLists.txt b/examples/dual/host_info_to_device_cdc/CMakeLists.txt index a6557c2d0..54e36e3d3 100644 --- a/examples/dual/host_info_to_device_cdc/CMakeLists.txt +++ b/examples/dual/host_info_to_device_cdc/CMakeLists.txt @@ -28,13 +28,15 @@ target_include_directories(${PROJECT} PUBLIC family_configure_dual_usb_example(${PROJECT} noos) # due to warnings from Pico-PIO-USB -target_compile_options(${PROJECT} PUBLIC - -Wno-error=shadow - -Wno-error=cast-align - -Wno-error=cast-qual - -Wno-error=redundant-decls - -Wno-error=sign-conversion - -Wno-error=conversion - -Wno-error=sign-compare - -Wno-error=unused-function - ) +if (FAMILY STREQUAL rp2040) + target_compile_options(${PROJECT} PUBLIC + -Wno-error=shadow + -Wno-error=cast-align + -Wno-error=cast-qual + -Wno-error=redundant-decls + -Wno-error=sign-conversion + -Wno-error=conversion + -Wno-error=sign-compare + -Wno-error=unused-function + ) +endif () diff --git a/examples/dual/host_info_to_device_cdc/Makefile b/examples/dual/host_info_to_device_cdc/Makefile index 0ede79c17..083c9169a 100644 --- a/examples/dual/host_info_to_device_cdc/Makefile +++ b/examples/dual/host_info_to_device_cdc/Makefile @@ -8,7 +8,7 @@ INC += \ EXAMPLE_SOURCE += $(wildcard src/*.c) SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) -CFLAGS += -Wno-error=cast-align -Wno-error=null-dereference +CFLAGS_GCC += -Wno-error=cast-align -Wno-error=null-dereference SRC_C += \ src/host/hub.c \ -- cgit v1.3.1