diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a9c7a30..0b54b3ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,6 +95,60 @@ target_sources( include/interrupt/manager.hpp include/interrupt/policies.hpp) +add_library(cib_lookup INTERFACE) +target_compile_features(cib_lookup INTERFACE cxx_std_20) +target_link_libraries_system(cib_lookup INTERFACE stdx) + +target_sources( + cib_lookup + INTERFACE FILE_SET + lookup + TYPE + HEADERS + BASE_DIRS + include + FILES + include/lookup/detail/select.hpp + include/lookup/entry.hpp + include/lookup/input.hpp + include/lookup/linear_search_lookup.hpp + include/lookup/lookup.hpp + include/lookup/pseudo_pext_lookup.hpp + include/lookup/strategies.hpp + include/lookup/strategy_failed.hpp) + +add_library(cib_log INTERFACE) +target_compile_features(cib_log INTERFACE cxx_std_20) +target_link_libraries_system(cib_log INTERFACE cib_sc stdx) + +target_sources( + cib_log + INTERFACE FILE_SET + log + TYPE + HEADERS + BASE_DIRS + include + FILES + include/log/level.hpp + include/log/log.hpp) + +add_library(cib_log_fmt INTERFACE) +target_compile_features(cib_log_fmt INTERFACE cxx_std_20) +target_link_libraries_system(cib_log_fmt INTERFACE cib_log fmt::fmt-header-only + stdx) + +target_sources( + cib_log_fmt + INTERFACE FILE_SET + log + TYPE + HEADERS + BASE_DIRS + include + FILES + include/log/fmt/logger.hpp) + add_library(cib INTERFACE) target_compile_features(cib INTERFACE cxx_std_20) target_link_libraries_system( @@ -102,6 +156,7 @@ target_link_libraries_system( INTERFACE async cib_interrupt + cib_lookup cib_match cib_sc concurrency @@ -155,39 +210,6 @@ target_sources( include/flow/run.hpp include/flow/step.hpp) -target_sources( - cib - INTERFACE FILE_SET - log - TYPE - HEADERS - BASE_DIRS - include - FILES - include/log/catalog/catalog.hpp - include/log/catalog/mipi_encoder.hpp - include/log/fmt/logger.hpp - include/log/level.hpp - include/log/log.hpp) - -target_sources( - cib - INTERFACE FILE_SET - lookup - TYPE - HEADERS - BASE_DIRS - include - FILES - include/lookup/detail/select.hpp - include/lookup/entry.hpp - include/lookup/input.hpp - include/lookup/linear_search_lookup.hpp - include/lookup/lookup.hpp - include/lookup/pseudo_pext_lookup.hpp - include/lookup/strategies.hpp - include/lookup/strategy_failed.hpp) - target_sources( cib INTERFACE FILE_SET @@ -226,6 +248,23 @@ target_sources( include/seq/impl.hpp include/seq/step.hpp) +add_library(cib_log_mipi INTERFACE) +target_compile_features(cib_log_mipi INTERFACE cxx_std_20) +target_link_libraries_system(cib_log_mipi INTERFACE cib cib_log concurrency + stdx) + +target_sources( + cib_log_mipi + INTERFACE FILE_SET + log + TYPE + HEADERS + BASE_DIRS + include + FILES + include/log/catalog/catalog.hpp + include/log/catalog/mipi_encoder.hpp) + if(PROJECT_IS_TOP_LEVEL) add_docs(docs) clang_tidy_interface(cib) diff --git a/test/log/CMakeLists.txt b/test/log/CMakeLists.txt index df8a11aa..228b136a 100644 --- a/test/log/CMakeLists.txt +++ b/test/log/CMakeLists.txt @@ -1,12 +1,6 @@ -add_tests( - FILES - fmt_logger - log - mipi_encoder - mipi_logger - module_id - LIBRARIES - cib) +add_tests(FILES log module_id LIBRARIES cib_log) +add_tests(FILES fmt_logger LIBRARIES cib_log_fmt) +add_tests(FILES mipi_encoder mipi_logger LIBRARIES cib_log_mipi) add_library(catalog1_lib STATIC catalog1_lib.cpp) add_library(catalog2_lib OBJECT catalog2a_lib.cpp catalog2b_lib.cpp) @@ -51,7 +45,7 @@ add_unit_test( catalog_app.cpp LIBRARIES warnings - cib + cib_log_mipi catalog1_lib catalog2_lib catalog_strings) diff --git a/test/lookup/CMakeLists.txt b/test/lookup/CMakeLists.txt index 611d808f..0c9a8afd 100644 --- a/test/lookup/CMakeLists.txt +++ b/test/lookup/CMakeLists.txt @@ -5,7 +5,7 @@ add_tests( pseudo_pext_lookup lookup LIBRARIES - cib) + cib_lookup) add_versioned_package("gh:boost-ext/mph#v1.0.8") add_versioned_package("gh:serge-sans-paille/frozen#292a811") @@ -78,7 +78,7 @@ foreach(BENCH_ALG_NAME ${BENCH_ALG_NAMES}) FILES pseudo_pext.cpp SYSTEM_LIBRARIES - cib + cib_lookup mph frozen-headers) target_compile_features(${name} PRIVATE cxx_std_23)