@@ -20,9 +20,17 @@ FetchContent_Declare(
20
20
GIT_TAG main
21
21
)
22
22
23
+ FetchContent_Declare (
24
+ connectionhandler
25
+ GIT_REPOSITORY https://github.com/arduino-libraries/Arduino_ConnectionHandler.git
26
+ GIT_TAG master
27
+ )
28
+
23
29
FetchContent_MakeAvailable (Catch2 )
24
30
25
31
FetchContent_MakeAvailable (cloudutils )
32
+
33
+ FetchContent_MakeAvailable (connectionhandler )
26
34
##########################################################################
27
35
28
36
include_directories (include )
@@ -55,6 +63,18 @@ target_include_directories(
55
63
${cloudutils_SOURCE_DIR} /src/interfaces
56
64
)
57
65
66
+ add_library (connectionhandler INTERFACE )
67
+
68
+ target_include_directories (
69
+ connectionhandler INTERFACE
70
+ ${connectionhandler_SOURCE_DIR} /src/
71
+ )
72
+
73
+ target_include_directories (
74
+ connectionhandler INTERFACE
75
+ ${connectionhandler_SOURCE_DIR} /src/connectionHandlerModels
76
+ )
77
+
58
78
##########################################################################
59
79
60
80
set (CMAKE_CXX_STANDARD 11 )
@@ -126,12 +146,13 @@ set(TEST_TARGET_SRCS
126
146
127
147
##########################################################################
128
148
149
+ add_compile_definitions (BOARD_HAS_LORA BOARD_HAS_CATM1_NBIOT BOARD_HAS_WIFI BOARD_HAS_ETHERNET BOARD_HAS_CELLULAR BOARD_HAS_NB BOARD_HAS_GSM )
129
150
add_compile_definitions (HOST HAS_TCP )
130
151
add_compile_options (-Wall -Wextra -Wpedantic -Werror )
131
152
add_compile_options (-Wno-cast-function-type )
132
153
133
154
set (CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "--coverage" )
134
- set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "--coverage -Wno-deprecated-copy" )
155
+ set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "--coverage -Wno-deprecated-copy -Wno-missing-field-initializers " )
135
156
136
157
##########################################################################
137
158
@@ -140,6 +161,7 @@ add_executable(
140
161
${TEST_TARGET_SRCS}
141
162
)
142
163
164
+ target_link_libraries ( ${TEST_TARGET} connectionhandler )
143
165
target_link_libraries ( ${TEST_TARGET} cloudutils )
144
166
target_link_libraries ( ${TEST_TARGET} Catch2WithMain )
145
167
0 commit comments