@@ -11,102 +11,19 @@ file(GLOB SOURCES CONFIGURE_DEPENDS *.cpp)
1111
1212add_subdirectory (doctest )
1313
14- #
15- # AVR
16- #
17- add_subdirectory (cores/avr )
18-
19- add_executable (StreamUtilsTestAvr ${SOURCES} )
20- target_link_libraries (StreamUtilsTestAvr AvrCore doctest )
14+ function (add_streamutils_test EXECUTABLE CORE )
15+ add_executable (${EXECUTABLE} ${SOURCES} )
16+ target_link_libraries (${EXECUTABLE} ${CORE} doctest )
17+ add_test (${EXECUTABLE} ${EXECUTABLE} )
18+ endfunction ()
2119
22- add_test (Avr StreamUtilsTestAvr )
23-
24- #
25- # ESP32
26- #
20+ add_subdirectory (cores/avr )
2721add_subdirectory (cores/esp32 )
28-
29- add_executable (StreamUtilsTestEsp32 ${SOURCES} )
30- target_link_libraries (StreamUtilsTestEsp32 Esp32Core doctest )
31-
32- add_test (Esp32 StreamUtilsTestEsp32 )
33-
34- #
35- # ESP8266
36- #
3722add_subdirectory (cores/esp8266 )
38-
39- add_executable (StreamUtilsTestEsp8266 ${SOURCES} )
40- target_link_libraries (StreamUtilsTestEsp8266 Esp8266Core doctest )
41-
42- add_test (Esp8266 StreamUtilsTestEsp8266 )
43-
44- #
45- # NRF52
46- #
4723add_subdirectory (cores/nrf52 )
48-
49- add_executable (StreamUtilsTestNrf52 ${SOURCES} )
50- target_link_libraries (StreamUtilsTestNrf52 Nrf52Core doctest )
51-
52- add_test (Nrf52 StreamUtilsTestNrf52 )
53-
54- #
55- # RP2040
56- #
5724add_subdirectory (cores/rp2040 )
58-
59- add_executable (StreamUtilsTestRp2040 ${SOURCES} )
60- target_link_libraries (StreamUtilsTestRp2040 Rp2040Core doctest )
61-
62- add_test (Rp2040 StreamUtilsTestRp2040 )
63-
64- #
65- # SAMD
66- #
6725add_subdirectory (cores/samd )
68-
69- add_executable (StreamUtilsTestSamd ${SOURCES} )
70- target_link_libraries (StreamUtilsTestSamd SamdCore doctest )
71-
72- add_test (Samd StreamUtilsTestSamd )
73-
74- #
75- # STM32 (Official core)
76- #
7726add_subdirectory (cores/stm32 )
78-
79- add_executable (StreamUtilsTestStm32 ${SOURCES} )
80- target_link_libraries (StreamUtilsTestStm32 Stm32Core doctest )
81-
82- add_test (Stm32 StreamUtilsTestStm32 )
83-
84- #
85- # STM32F1 (Roger's core)
86- #
8727add_subdirectory (cores/stm32f1 )
88-
89- add_executable (StreamUtilsTestStm32F1 ${SOURCES} )
90- target_link_libraries (StreamUtilsTestStm32F1 Stm32F1Core doctest )
91-
92- add_test (Stm32F1 StreamUtilsTestStm32F1 )
93-
94- #
95- # STM32F4 (Roger's core)
96- #
9728add_subdirectory (cores/stm32f4 )
98-
99- add_executable (StreamUtilsTestStm32F4 ${SOURCES} )
100- target_link_libraries (StreamUtilsTestStm32F4 Stm32F4Core doctest )
101-
102- add_test (Stm32F4 StreamUtilsTestStm32F4 )
103-
104- #
105- # Teensy
106- #
107- add_subdirectory (cores/teensy )
108-
109- add_executable (StreamUtilsTestTeensy ${SOURCES} )
110- target_link_libraries (StreamUtilsTestTeensy TeensyCore doctest )
111-
112- add_test (Teensy StreamUtilsTestTeensy )
29+ add_subdirectory (cores/teensy )
0 commit comments