File tree 29 files changed +101
-133
lines changed
dual/host_hid_to_device_cdc
portable/raspberrypi/rp2040
29 files changed +101
-133
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change 36
36
${CMAKE_CURRENT_SOURCE_DIR} /src
37
37
)
38
38
39
- # Example common such as compiler warnings
40
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
41
-
42
39
# Configure compilation flags and libraries for the example... see the corresponding function
43
40
# in hw/bsp/FAMILY/family.cmake for details.
44
41
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -24,9 +24,6 @@ target_include_directories(${PROJECT} PUBLIC
24
24
${CMAKE_CURRENT_SOURCE_DIR} /src
25
25
)
26
26
27
- # Example common such as compiler warnings
28
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
29
-
30
27
# Configure compilation flags and libraries for the example... see the corresponding function
31
28
# in hw/bsp/FAMILY/family.cmake for details.
32
29
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -24,9 +24,6 @@ target_include_directories(${PROJECT} PUBLIC
24
24
${CMAKE_CURRENT_SOURCE_DIR} /src
25
25
)
26
26
27
- # Example common such as compiler warnings
28
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
29
-
30
27
# Configure compilation flags and libraries for the example... see the corresponding function
31
28
# in hw/bsp/FAMILY/family.cmake for details.
32
29
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -24,9 +24,6 @@ target_include_directories(${PROJECT} PUBLIC
24
24
${CMAKE_CURRENT_SOURCE_DIR} /src
25
25
)
26
26
27
- # Example common such as compiler warnings
28
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
29
-
30
27
# Configure compilation flags and libraries for the example... see the corresponding function
31
28
# in hw/bsp/FAMILY/family.cmake for details.
32
29
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -69,9 +69,6 @@ if (EXISTS ${TOP}/lib/lwip/src)
69
69
${TOP} /lib/networking/rndis_reports.c
70
70
)
71
71
72
- # Example common such as compiler warnings
73
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
74
-
75
72
# due to warnings from other net source, we need to prevent error from some of the warnings options
76
73
target_compile_options (${PROJECT} PUBLIC
77
74
-Wno-error=null-dereference
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -24,9 +24,6 @@ target_include_directories(${PROJECT} PUBLIC
24
24
${CMAKE_CURRENT_SOURCE_DIR} /src
25
25
)
26
26
27
- # Example common such as compiler warnings
28
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
29
-
30
27
# Configure compilation flags and libraries for the example... see the corresponding function
31
28
# in hw/bsp/FAMILY/family.cmake for details.
32
29
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_device_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -23,8 +23,9 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
26
+ # Configure compilation flags and libraries for the example... see the corresponding function
27
+ # in hw/bsp/FAMILY/family.cmake for details.
28
+ family_configure_dual_usb_example(${PROJECT} )
28
29
29
30
# due to warnings from other net source, we need to prevent error from some of the warnings options
30
31
target_compile_options (${PROJECT} PUBLIC
@@ -37,7 +38,3 @@ target_compile_options(${PROJECT} PUBLIC
37
38
-Wno-error=sign-compare
38
39
-Wno-error=unused-function
39
40
)
40
-
41
- # Configure compilation flags and libraries for the example... see the corresponding function
42
- # in hw/bsp/FAMILY/family.cmake for details.
43
- family_configure_dual_usb_example(${PROJECT} )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -22,9 +22,6 @@ target_include_directories(${PROJECT} PUBLIC
22
22
${CMAKE_CURRENT_SOURCE_DIR} /src
23
23
)
24
24
25
- # Example common such as compiler warnings
26
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
27
-
28
25
# Configure compilation flags and libraries for the example... see the corresponding function
29
26
# in hw/bsp/FAMILY/family.cmake for details.
30
27
family_configure_host_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -24,9 +24,6 @@ target_include_directories(${PROJECT} PUBLIC
24
24
${CMAKE_CURRENT_SOURCE_DIR} /src
25
25
)
26
26
27
- # Example common such as compiler warnings
28
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
29
-
30
27
# Configure compilation flags and libraries for the example... see the corresponding function
31
28
# in hw/bsp/FAMILY/family.cmake for details.
32
29
family_configure_host_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ target_include_directories(${PROJECT} PUBLIC
23
23
${CMAKE_CURRENT_SOURCE_DIR} /src
24
24
)
25
25
26
- # Example common such as compiler warnings
27
- include (${CMAKE_CURRENT_SOURCE_DIR} /../../example.cmake)
28
-
29
26
# Configure compilation flags and libraries for the example... see the corresponding function
30
27
# in hw/bsp/FAMILY/family.cmake for details.
31
28
family_configure_host_example(${PROJECT} )
Original file line number Diff line number Diff line change @@ -79,6 +79,48 @@ if (NOT TARGET _family_support_marker)
79
79
endif ()
80
80
endfunction ()
81
81
82
+ function (family_add_default_example_warnings TARGET )
83
+ target_compile_options (${TARGET} PUBLIC
84
+ -Wall
85
+ -Wextra
86
+ -Werror
87
+ -Wfatal-errors
88
+ -Wdouble-promotion
89
+ -Wfloat-equal
90
+ -Wshadow
91
+ -Wwrite-strings
92
+ -Wsign-compare
93
+ -Wmissing-format-attribute
94
+ -Wunreachable-code
95
+ -Wcast-align
96
+ -Wcast-qual
97
+ -Wnull-dereference
98
+ -Wuninitialized
99
+ -Wunused
100
+ -Wredundant-decls
101
+ #-Wstrict-prototypes
102
+ #-Werror-implicit-function-declaration
103
+ #-Wundef
104
+ )
105
+
106
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" )
107
+ # GCC 10
108
+ if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
109
+ target_compile_options (${TARGET} PUBLIC -Wconversion)
110
+ endif ()
111
+
112
+ # GCC 8
113
+ if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
114
+ target_compile_options (${TARGET} PUBLIC -Wcast-function-type -Wstrict-overflow)
115
+ endif ()
116
+
117
+ # GCC 6
118
+ if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 6.0)
119
+ target_compile_options (${TARGET} PUBLIC -Wno-strict-aliasing)
120
+ endif ()
121
+ endif ()
122
+ endfunction ()
123
+
82
124
# configure an executable target to link to tinyusb in device mode, and add the board implementation
83
125
function (family_configure_device_example TARGET )
84
126
# default implentation is empty, the function should be redefined in the FAMILY/family.cmake
You can’t perform that action at this time.
0 commit comments