Skip to content

Commit aa250b4

Browse files
authored
Merge pull request #659 from elbeno/split-more-libs
Split more libs
2 parents cba5f7a + 54741fd commit aa250b4

File tree

3 files changed

+78
-45
lines changed

3 files changed

+78
-45
lines changed

CMakeLists.txt

Lines changed: 72 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,68 @@ target_sources(
9595
include/interrupt/manager.hpp
9696
include/interrupt/policies.hpp)
9797

98+
add_library(cib_lookup INTERFACE)
99+
target_compile_features(cib_lookup INTERFACE cxx_std_20)
100+
target_link_libraries_system(cib_lookup INTERFACE stdx)
101+
102+
target_sources(
103+
cib_lookup
104+
INTERFACE FILE_SET
105+
lookup
106+
TYPE
107+
HEADERS
108+
BASE_DIRS
109+
include
110+
FILES
111+
include/lookup/detail/select.hpp
112+
include/lookup/entry.hpp
113+
include/lookup/input.hpp
114+
include/lookup/linear_search_lookup.hpp
115+
include/lookup/lookup.hpp
116+
include/lookup/pseudo_pext_lookup.hpp
117+
include/lookup/strategies.hpp
118+
include/lookup/strategy_failed.hpp)
119+
120+
add_library(cib_log INTERFACE)
121+
target_compile_features(cib_log INTERFACE cxx_std_20)
122+
target_link_libraries_system(cib_log INTERFACE cib_sc stdx)
123+
124+
target_sources(
125+
cib_log
126+
INTERFACE FILE_SET
127+
log
128+
TYPE
129+
HEADERS
130+
BASE_DIRS
131+
include
132+
FILES
133+
include/log/level.hpp
134+
include/log/log.hpp)
135+
136+
add_library(cib_log_fmt INTERFACE)
137+
target_compile_features(cib_log_fmt INTERFACE cxx_std_20)
138+
target_link_libraries_system(cib_log_fmt INTERFACE cib_log fmt::fmt-header-only
139+
stdx)
140+
141+
target_sources(
142+
cib_log_fmt
143+
INTERFACE FILE_SET
144+
log
145+
TYPE
146+
HEADERS
147+
BASE_DIRS
148+
include
149+
FILES
150+
include/log/fmt/logger.hpp)
151+
98152
add_library(cib INTERFACE)
99153
target_compile_features(cib INTERFACE cxx_std_20)
100154
target_link_libraries_system(
101155
cib
102156
INTERFACE
103157
async
104158
cib_interrupt
159+
cib_lookup
105160
cib_match
106161
cib_sc
107162
concurrency
@@ -155,39 +210,6 @@ target_sources(
155210
include/flow/run.hpp
156211
include/flow/step.hpp)
157212

158-
target_sources(
159-
cib
160-
INTERFACE FILE_SET
161-
log
162-
TYPE
163-
HEADERS
164-
BASE_DIRS
165-
include
166-
FILES
167-
include/log/catalog/catalog.hpp
168-
include/log/catalog/mipi_encoder.hpp
169-
include/log/fmt/logger.hpp
170-
include/log/level.hpp
171-
include/log/log.hpp)
172-
173-
target_sources(
174-
cib
175-
INTERFACE FILE_SET
176-
lookup
177-
TYPE
178-
HEADERS
179-
BASE_DIRS
180-
include
181-
FILES
182-
include/lookup/detail/select.hpp
183-
include/lookup/entry.hpp
184-
include/lookup/input.hpp
185-
include/lookup/linear_search_lookup.hpp
186-
include/lookup/lookup.hpp
187-
include/lookup/pseudo_pext_lookup.hpp
188-
include/lookup/strategies.hpp
189-
include/lookup/strategy_failed.hpp)
190-
191213
target_sources(
192214
cib
193215
INTERFACE FILE_SET
@@ -226,6 +248,23 @@ target_sources(
226248
include/seq/impl.hpp
227249
include/seq/step.hpp)
228250

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+
229268
if(PROJECT_IS_TOP_LEVEL)
230269
add_docs(docs)
231270
clang_tidy_interface(cib)

test/log/CMakeLists.txt

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
add_tests(
2-
FILES
3-
fmt_logger
4-
log
5-
mipi_encoder
6-
mipi_logger
7-
module_id
8-
LIBRARIES
9-
cib)
1+
add_tests(FILES log module_id LIBRARIES cib_log)
2+
add_tests(FILES fmt_logger LIBRARIES cib_log_fmt)
3+
add_tests(FILES mipi_encoder mipi_logger LIBRARIES cib_log_mipi)
104

115
add_library(catalog1_lib STATIC catalog1_lib.cpp)
126
add_library(catalog2_lib OBJECT catalog2a_lib.cpp catalog2b_lib.cpp)
@@ -51,7 +45,7 @@ add_unit_test(
5145
catalog_app.cpp
5246
LIBRARIES
5347
warnings
54-
cib
48+
cib_log_mipi
5549
catalog1_lib
5650
catalog2_lib
5751
catalog_strings)

test/lookup/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ add_tests(
55
pseudo_pext_lookup
66
lookup
77
LIBRARIES
8-
cib)
8+
cib_lookup)
99

1010
add_versioned_package("gh:boost-ext/mph#v1.0.8")
1111
add_versioned_package("gh:serge-sans-paille/frozen#292a811")
@@ -78,7 +78,7 @@ foreach(BENCH_ALG_NAME ${BENCH_ALG_NAMES})
7878
FILES
7979
pseudo_pext.cpp
8080
SYSTEM_LIBRARIES
81-
cib
81+
cib_lookup
8282
mph
8383
frozen-headers)
8484
target_compile_features(${name} PRIVATE cxx_std_23)

0 commit comments

Comments
 (0)