Skip to content

Commit bc71244

Browse files
committed
🎨 Split msg into separate library
1 parent 4f2e457 commit bc71244

File tree

4 files changed

+84
-59
lines changed

4 files changed

+84
-59
lines changed

CMakeLists.txt

Lines changed: 63 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,43 @@ target_sources(
133133
include/log/level.hpp
134134
include/log/log.hpp)
135135

136+
add_library(cib_msg INTERFACE)
137+
target_compile_features(cib_msg INTERFACE cxx_std_20)
138+
target_link_libraries_system(
139+
cib_msg
140+
INTERFACE
141+
async
142+
cib_log
143+
cib_lookup
144+
cib_match
145+
cib_sc
146+
stdx)
147+
148+
target_sources(
149+
cib_msg
150+
INTERFACE FILE_SET
151+
msg
152+
TYPE
153+
HEADERS
154+
BASE_DIRS
155+
include
156+
FILES
157+
include/msg/callback.hpp
158+
include/msg/detail/indexed_builder_common.hpp
159+
include/msg/detail/indexed_handler_common.hpp
160+
include/msg/detail/separate_sum_terms.hpp
161+
include/msg/field.hpp
162+
include/msg/field_matchers.hpp
163+
include/msg/handler_builder.hpp
164+
include/msg/handler.hpp
165+
include/msg/handler_interface.hpp
166+
include/msg/indexed_builder.hpp
167+
include/msg/indexed_handler.hpp
168+
include/msg/indexed_service.hpp
169+
include/msg/message.hpp
170+
include/msg/send.hpp
171+
include/msg/service.hpp)
172+
136173
add_library(cib_log_fmt INTERFACE)
137174
target_compile_features(cib_log_fmt INTERFACE cxx_std_20)
138175
target_link_libraries_system(cib_log_fmt INTERFACE cib_log fmt::fmt-header-only
@@ -149,15 +186,36 @@ target_sources(
149186
FILES
150187
include/log/fmt/logger.hpp)
151188

189+
add_library(cib_log_mipi INTERFACE)
190+
target_compile_features(cib_log_mipi INTERFACE cxx_std_20)
191+
target_link_libraries_system(cib_log_mipi INTERFACE cib_log cib_msg concurrency
192+
stdx)
193+
194+
target_sources(
195+
cib_log_mipi
196+
INTERFACE FILE_SET
197+
log
198+
TYPE
199+
HEADERS
200+
BASE_DIRS
201+
include
202+
FILES
203+
include/log/catalog/catalog.hpp
204+
include/log/catalog/mipi_encoder.hpp)
205+
152206
add_library(cib INTERFACE)
153207
target_compile_features(cib INTERFACE cxx_std_20)
154208
target_link_libraries_system(
155209
cib
156210
INTERFACE
157211
async
158212
cib_interrupt
213+
cib_log
214+
cib_log_fmt
215+
cib_log_mipi
159216
cib_lookup
160217
cib_match
218+
cib_msg
161219
cib_sc
162220
concurrency
163221
fmt::fmt-header-only
@@ -210,31 +268,6 @@ target_sources(
210268
include/flow/run.hpp
211269
include/flow/step.hpp)
212270

213-
target_sources(
214-
cib
215-
INTERFACE FILE_SET
216-
msg
217-
TYPE
218-
HEADERS
219-
BASE_DIRS
220-
include
221-
FILES
222-
include/msg/callback.hpp
223-
include/msg/detail/indexed_builder_common.hpp
224-
include/msg/detail/indexed_handler_common.hpp
225-
include/msg/detail/separate_sum_terms.hpp
226-
include/msg/field.hpp
227-
include/msg/field_matchers.hpp
228-
include/msg/handler_builder.hpp
229-
include/msg/handler.hpp
230-
include/msg/handler_interface.hpp
231-
include/msg/indexed_builder.hpp
232-
include/msg/indexed_handler.hpp
233-
include/msg/indexed_service.hpp
234-
include/msg/message.hpp
235-
include/msg/send.hpp
236-
include/msg/service.hpp)
237-
238271
target_sources(
239272
cib
240273
INTERFACE FILE_SET
@@ -248,28 +281,16 @@ target_sources(
248281
include/seq/impl.hpp
249282
include/seq/step.hpp)
250283

251-
add_library(cib_log_mipi INTERFACE)
252-
target_compile_features(cib_log_mipi INTERFACE cxx_std_20)
253-
target_link_libraries_system(cib_log_mipi INTERFACE cib cib_log concurrency
254-
stdx)
255-
256-
target_sources(
257-
cib_log_mipi
258-
INTERFACE FILE_SET
259-
log
260-
TYPE
261-
HEADERS
262-
BASE_DIRS
263-
include
264-
FILES
265-
include/log/catalog/catalog.hpp
266-
include/log/catalog/mipi_encoder.hpp)
267-
268284
if(PROJECT_IS_TOP_LEVEL)
269285
add_docs(docs)
270286
clang_tidy_interface(cib)
271287
clang_tidy_interface(cib_interrupt)
288+
clang_tidy_interface(cib_lookup)
289+
clang_tidy_interface(cib_log)
290+
clang_tidy_interface(cib_log_fmt)
291+
clang_tidy_interface(cib_log_mipi)
272292
clang_tidy_interface(cib_match)
293+
clang_tidy_interface(cib_msg)
273294
clang_tidy_interface(cib_sc)
274295

275296
# Enable functional and performance test suites.

docs/intro.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ The library dependencies are:
3434

3535
- https://github.com/boostorg/mp11[Boost.MP11]
3636
- https://github.com/intel/cpp-std-extensions[C++ std extensions (`stdx`)]
37-
- https://github.com/intel/cpp-baremetal-concurrency[Baremetal Concurrency]
37+
- https://github.com/intel/cpp-baremetal-concurrency[Baremetal Concurrency (`conc`)]
38+
- https://github.com/intel/cpp-senders-and-receivers[Baremetal Senders and Receivers (`async`)]
3839
- https://github.com/fmtlib/fmt[fmt]
3940

4041
=== Libraries

test/msg/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ add_tests(
1212
message
1313
send
1414
LIBRARIES
15-
cib)
15+
cib_msg)
1616

1717
add_subdirectory(fail)
1818

test/msg/fail/CMakeLists.txt

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
add_compile_fail_test(callback_bad_field_name.cpp LIBRARIES warnings cib)
2-
add_compile_fail_test(field_location.cpp LIBRARIES warnings cib)
3-
add_compile_fail_test(field_size.cpp LIBRARIES warnings cib)
4-
add_compile_fail_test(impossible_match_callback.cpp LIBRARIES warnings cib)
5-
add_compile_fail_test(impossible_match_field.cpp LIBRARIES warnings cib)
1+
add_compile_fail_test(callback_bad_field_name.cpp LIBRARIES warnings cib_msg)
2+
add_compile_fail_test(field_location.cpp LIBRARIES warnings cib_msg)
3+
add_compile_fail_test(field_size.cpp LIBRARIES warnings cib_msg)
4+
add_compile_fail_test(impossible_match_callback.cpp LIBRARIES warnings cib_msg)
5+
add_compile_fail_test(impossible_match_field.cpp LIBRARIES warnings cib_msg)
66
add_compile_fail_test(owning_msg_incompatible_storage.cpp LIBRARIES warnings
7-
cib)
8-
add_compile_fail_test(owning_msg_incompatible_view.cpp LIBRARIES warnings cib)
9-
add_compile_fail_test(message_cmp_owner.cpp LIBRARIES warnings cib)
10-
add_compile_fail_test(message_cmp_view.cpp LIBRARIES warnings cib)
11-
add_compile_fail_test(message_const_field_write.cpp LIBRARIES warnings cib)
12-
add_compile_fail_test(message_dangling_view.cpp LIBRARIES warnings cib)
13-
add_compile_fail_test(message_dup_fieldnames.cpp LIBRARIES warnings cib)
14-
add_compile_fail_test(message_incompatible_matcher.cpp LIBRARIES warnings cib)
15-
add_compile_fail_test(message_uninitialized_field.cpp LIBRARIES warnings cib)
16-
add_compile_fail_test(view_upsize.cpp LIBRARIES warnings cib)
7+
cib_msg)
8+
add_compile_fail_test(owning_msg_incompatible_view.cpp LIBRARIES warnings
9+
cib_msg)
10+
add_compile_fail_test(message_cmp_owner.cpp LIBRARIES warnings cib_msg)
11+
add_compile_fail_test(message_cmp_view.cpp LIBRARIES warnings cib_msg)
12+
add_compile_fail_test(message_const_field_write.cpp LIBRARIES warnings cib_msg)
13+
add_compile_fail_test(message_dangling_view.cpp LIBRARIES warnings cib_msg)
14+
add_compile_fail_test(message_dup_fieldnames.cpp LIBRARIES warnings cib_msg)
15+
add_compile_fail_test(message_incompatible_matcher.cpp LIBRARIES warnings
16+
cib_msg)
17+
add_compile_fail_test(message_uninitialized_field.cpp LIBRARIES warnings
18+
cib_msg)
19+
add_compile_fail_test(view_upsize.cpp LIBRARIES warnings cib_msg)

0 commit comments

Comments
 (0)