summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-04-14 13:17:12 +0700
committerhathach <[email protected]>2026-04-14 13:17:12 +0700
commitb55786e43af764397ebadf96609d77826d38bffe (patch)
tree60cfbefe23a1e45f00687c5492ff40723885ed5c /examples
parent44b0ee05390b0f97d006a016b25fa513699e0a96 (diff)
refactor rp2040 family.cmake to use family_configure_example() and apply WARN_FLAGS to tinyusb sources and examples sources only (skip 3rd party library and mcu vendor)
Diffstat (limited to 'examples')
-rw-r--r--examples/host/msc_file_explorer/CMakeLists.txt14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/host/msc_file_explorer/CMakeLists.txt b/examples/host/msc_file_explorer/CMakeLists.txt
index 21703030c..3c6d3352a 100644
--- a/examples/host/msc_file_explorer/CMakeLists.txt
+++ b/examples/host/msc_file_explorer/CMakeLists.txt
@@ -23,13 +23,6 @@ target_sources(${PROJECT_NAME} PUBLIC
${TOP}/lib/fatfs/source/ffunicode.c
)
-# Suppress warnings on fatfs
-if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
- set_source_files_properties(${TOP}/lib/fatfs/source/ff.c PROPERTIES
- COMPILE_FLAGS "-Wno-conversion -Wno-cast-qual"
- )
-endif ()
-
# Example include
target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
@@ -40,3 +33,10 @@ target_include_directories(${PROJECT_NAME} PUBLIC
# Configure compilation flags and libraries for the example without RTOS.
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
family_configure_host_example(${PROJECT_NAME} noos)
+
+# Suppress warnings on fatfs
+if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ set_source_files_properties(${TOP}/lib/fatfs/source/ff.c PROPERTIES
+ COMPILE_OPTIONS "-Wno-conversion -Wno-cast-qual"
+ )
+endif ()