Skip to content

Commit

Permalink
MON-17452 multiplexing sources are compiled in multiplexing static li…
Browse files Browse the repository at this point in the history
…brary
  • Loading branch information
jean-christophe81 committed Mar 22, 2023
1 parent 5d53489 commit 396aad5
Show file tree
Hide file tree
Showing 18 changed files with 363 additions and 290 deletions.
345 changes: 173 additions & 172 deletions broker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ endif()

include_directories(
"${PROJECT_SOURCE_DIR}/core/inc" "${PROJECT_SOURCE_DIR}/neb/inc"
"${CMAKE_SOURCE_DIR}/engine/inc")
"${CMAKE_SOURCE_DIR}/engine/inc" "${PROJECT_SOURCE_DIR}/core/multiplexing/inc")
set(INC_DIR "${PROJECT_SOURCE_DIR}/core/inc/com/centreon/broker")
set(SRC_DIR "${PROJECT_SOURCE_DIR}/core/src")
set(TEST_DIR "${PROJECT_SOURCE_DIR}/core/test")
Expand Down Expand Up @@ -305,177 +305,173 @@ configure_file("${INC_DIR}/vars.hh.in" "${INC_DIR}/vars.hh" "@ONLY")

# Core library.
set(LIBROKER_SOURCES
# Sources.
${SRC_DIR}/bbdo/acceptor.cc
${SRC_DIR}/bbdo/connector.cc
${SRC_DIR}/bbdo/factory.cc
${SRC_DIR}/bbdo/internal.cc
${SRC_DIR}/bbdo/stream.cc
${SRC_DIR}/broker_impl.cc
${SRC_DIR}/brokerrpc.cc
${SRC_DIR}/compression/factory.cc
${SRC_DIR}/compression/opener.cc
${SRC_DIR}/compression/stack_array.cc
${SRC_DIR}/compression/stream.cc
${SRC_DIR}/compression/zlib.cc
${SRC_DIR}/config/applier/endpoint.cc
${SRC_DIR}/config/applier/modules.cc
${SRC_DIR}/config/applier/state.cc
${SRC_DIR}/config/endpoint.cc
${SRC_DIR}/config/parser.cc
${SRC_DIR}/config/state.cc
${SRC_DIR}/database_config.cc
${SRC_DIR}/file/cfile.cc
${SRC_DIR}/file/disk_accessor.cc
${SRC_DIR}/file/directory_event.cc
${SRC_DIR}/file/directory_watcher.cc
${SRC_DIR}/file/factory.cc
${SRC_DIR}/file/fifo.cc
${SRC_DIR}/file/opener.cc
${SRC_DIR}/file/splitter.cc
${SRC_DIR}/file/stream.cc
${SRC_DIR}/instance_broadcast.cc
${SRC_DIR}/io/data.cc
${SRC_DIR}/io/endpoint.cc
${SRC_DIR}/io/limit_endpoint.cc
${SRC_DIR}/io/events.cc
${SRC_DIR}/io/factory.cc
${SRC_DIR}/io/protocols.cc
${SRC_DIR}/io/raw.cc
${SRC_DIR}/io/stream.cc
${SRC_DIR}/mapping/entry.cc
${SRC_DIR}/misc/diagnostic.cc
${SRC_DIR}/misc/filesystem.cc
${SRC_DIR}/misc/misc.cc
${SRC_DIR}/misc/parse_perfdata.cc
${SRC_DIR}/misc/perfdata.cc
${SRC_DIR}/misc/processing_speed_computer.cc
${SRC_DIR}/misc/string.cc
${SRC_DIR}/misc/time.cc
${SRC_DIR}/misc/uuid.cc
${SRC_DIR}/misc/variant.cc
${SRC_DIR}/modules/handle.cc
${SRC_DIR}/multiplexing/engine.cc
${SRC_DIR}/multiplexing/muxer.cc
${SRC_DIR}/multiplexing/publisher.cc
${SRC_DIR}/mysql.cc
${SRC_DIR}/pool.cc
${SRC_DIR}/database/mysql_bind_base.cc
${SRC_DIR}/database/mysql_bind.cc
${SRC_DIR}/database/mysql_bind_result.cc
${SRC_DIR}/database/mysql_bulk_bind.cc
${SRC_DIR}/database/mysql_column.cc
${SRC_DIR}/mysql_manager.cc
${SRC_DIR}/database/mysql_result.cc
${SRC_DIR}/database/mysql_stmt_base.cc
${SRC_DIR}/database/mysql_stmt.cc
${SRC_DIR}/database/mysql_bulk_stmt.cc
${SRC_DIR}/mysql_connection.cc
${SRC_DIR}/query_preparator.cc
${SRC_DIR}/persistent_cache.cc
${SRC_DIR}/persistent_file.cc
${SRC_DIR}/processing/acceptor.cc
${SRC_DIR}/processing/failover.cc
${SRC_DIR}/processing/feeder.cc
${SRC_DIR}/processing/stat_visitable.cc
${SRC_DIR}/stats/center.cc
${SRC_DIR}/stats/helper.cc
${SRC_DIR}/time/daterange.cc
${SRC_DIR}/time/timeperiod.cc
${SRC_DIR}/time/timerange.cc
${SRC_DIR}/time/timezone_locker.cc
${SRC_DIR}/time/timezone_manager.cc
# Headers.
${INC_DIR}/bbdo/acceptor.hh
${INC_DIR}/bbdo/connector.hh
${INC_DIR}/bbdo/factory.hh
${INC_DIR}/bbdo/internal.hh
${INC_DIR}/bbdo/stream.hh
${INC_DIR}/broker_impl.hh
${INC_DIR}/brokerrpc.hh
${INC_DIR}/compression/factory.hh
${INC_DIR}/compression/opener.hh
${INC_DIR}/compression/stack_array.hh
${INC_DIR}/compression/stream.hh
${INC_DIR}/config/applier/endpoint.hh
${INC_DIR}/config/applier/init.hh
${INC_DIR}/config/applier/modules.hh
${INC_DIR}/config/applier/state.hh
${INC_DIR}/config/endpoint.hh
${INC_DIR}/config/parser.hh
${INC_DIR}/config/state.hh
${INC_DIR}/database_config.hh
${INC_DIR}/exceptions/config.hh
${INC_DIR}/exceptions/interrupt.hh
${INC_DIR}/exceptions/shutdown.hh
${INC_DIR}/exceptions/timeout.hh
${INC_DIR}/file/cfile.hh
${INC_DIR}/file/directory_event.hh
${INC_DIR}/file/directory_watcher.hh
${INC_DIR}/file/factory.hh
${INC_DIR}/file/fifo.hh
${INC_DIR}/file/fs_file.hh
${INC_DIR}/file/opener.hh
${INC_DIR}/file/splitter.hh
${INC_DIR}/file/stream.hh
${INC_DIR}/instance_broadcast.hh
${INC_DIR}/io/data.hh
${INC_DIR}/io/endpoint.hh
${INC_DIR}/io/limit_endpoint.hh
${INC_DIR}/io/event_info.hh
${INC_DIR}/io/events.hh
${INC_DIR}/io/factory.hh
${INC_DIR}/io/protocols.hh
${INC_DIR}/io/raw.hh
${INC_DIR}/io/stream.hh
${INC_DIR}/mapping/entry.hh
${INC_DIR}/mapping/property.hh
${INC_DIR}/mapping/source.hh
${INC_DIR}/misc/diagnostic.hh
${INC_DIR}/misc/filesystem.hh
${INC_DIR}/misc/misc.hh
${INC_DIR}/misc/perfdata.hh
${INC_DIR}/misc/processing_speed_computer.hh
${INC_DIR}/misc/shared_mutex.hh
${INC_DIR}/misc/string.hh
${INC_DIR}/misc/time.hh
${INC_DIR}/misc/trash.hh
${INC_DIR}/misc/variant.hh
${INC_DIR}/modules/handle.hh
${INC_DIR}/multiplexing/engine.hh
${INC_DIR}/multiplexing/muxer.hh
${INC_DIR}/multiplexing/publisher.hh
${INC_DIR}/mysql.hh
${INC_DIR}/pool.hh
${INC_DIR}/database/mysql_bulk_bind.hh
${INC_DIR}/database/mysql_column.hh
${INC_DIR}/database/mysql_error.hh
${INC_DIR}/mysql_manager.hh
${INC_DIR}/database/mysql_result.hh
${INC_DIR}/database/mysql_stmt_base.hh
${INC_DIR}/database/mysql_stmt.hh
${INC_DIR}/database/mysql_bulk_stmt.hh
${INC_DIR}/database/mysql_task.hh
${INC_DIR}/database/table_max_size.hh
${INC_DIR}/mysql_connection.hh
${INC_DIR}/query_preparator.hh
${INC_DIR}/persistent_cache.hh
${INC_DIR}/persistent_file.hh
${INC_DIR}/processing/acceptor.hh
${INC_DIR}/processing/failover.hh
${INC_DIR}/processing/feeder.hh
${INC_DIR}/processing/stat_visitable.hh
${INC_DIR}/stats/helper.hh
${INC_DIR}/time/daterange.hh
${INC_DIR}/time/ptr_typedef.hh
${INC_DIR}/time/time_info.hh
${INC_DIR}/time/timeperiod.hh
${INC_DIR}/time/timerange.hh
${INC_DIR}/time/timezone_locker.hh
${INC_DIR}/time/timezone_manager.hh
${INC_DIR}/timestamp.hh
${INC_DIR}/vars.hh
${INC_DIR}/version.hh)

# Sources.
${SRC_DIR}/bbdo/acceptor.cc
${SRC_DIR}/bbdo/connector.cc
${SRC_DIR}/bbdo/factory.cc
${SRC_DIR}/bbdo/internal.cc
${SRC_DIR}/bbdo/stream.cc
${SRC_DIR}/broker_impl.cc
${SRC_DIR}/brokerrpc.cc
${SRC_DIR}/compression/factory.cc
${SRC_DIR}/compression/opener.cc
${SRC_DIR}/compression/stack_array.cc
${SRC_DIR}/compression/stream.cc
${SRC_DIR}/compression/zlib.cc
${SRC_DIR}/config/applier/endpoint.cc
${SRC_DIR}/config/applier/modules.cc
${SRC_DIR}/config/applier/state.cc
${SRC_DIR}/config/endpoint.cc
${SRC_DIR}/config/parser.cc
${SRC_DIR}/config/state.cc
${SRC_DIR}/database_config.cc
${SRC_DIR}/file/cfile.cc
${SRC_DIR}/file/disk_accessor.cc
${SRC_DIR}/file/directory_event.cc
${SRC_DIR}/file/directory_watcher.cc
${SRC_DIR}/file/factory.cc
${SRC_DIR}/file/fifo.cc
${SRC_DIR}/file/opener.cc
${SRC_DIR}/file/splitter.cc
${SRC_DIR}/file/stream.cc
${SRC_DIR}/instance_broadcast.cc
${SRC_DIR}/io/data.cc
${SRC_DIR}/io/endpoint.cc
${SRC_DIR}/io/limit_endpoint.cc
${SRC_DIR}/io/events.cc
${SRC_DIR}/io/factory.cc
${SRC_DIR}/io/protocols.cc
${SRC_DIR}/io/raw.cc
${SRC_DIR}/io/stream.cc
${SRC_DIR}/mapping/entry.cc
${SRC_DIR}/misc/diagnostic.cc
${SRC_DIR}/misc/filesystem.cc
${SRC_DIR}/misc/misc.cc
${SRC_DIR}/misc/parse_perfdata.cc
${SRC_DIR}/misc/perfdata.cc
${SRC_DIR}/misc/processing_speed_computer.cc
${SRC_DIR}/misc/string.cc
${SRC_DIR}/misc/time.cc
${SRC_DIR}/misc/uuid.cc
${SRC_DIR}/misc/variant.cc
${SRC_DIR}/modules/handle.cc
${SRC_DIR}/mysql.cc
${SRC_DIR}/pool.cc
${SRC_DIR}/database/mysql_bind_base.cc
${SRC_DIR}/database/mysql_bind.cc
${SRC_DIR}/database/mysql_bind_result.cc
${SRC_DIR}/database/mysql_bulk_bind.cc
${SRC_DIR}/database/mysql_column.cc
${SRC_DIR}/mysql_manager.cc
${SRC_DIR}/database/mysql_result.cc
${SRC_DIR}/database/mysql_stmt_base.cc
${SRC_DIR}/database/mysql_stmt.cc
${SRC_DIR}/database/mysql_bulk_stmt.cc
${SRC_DIR}/mysql_connection.cc
${SRC_DIR}/query_preparator.cc
${SRC_DIR}/persistent_cache.cc
${SRC_DIR}/persistent_file.cc
${SRC_DIR}/processing/acceptor.cc
${SRC_DIR}/processing/failover.cc
${SRC_DIR}/processing/feeder.cc
${SRC_DIR}/processing/stat_visitable.cc
${SRC_DIR}/stats/center.cc
${SRC_DIR}/stats/helper.cc
${SRC_DIR}/time/daterange.cc
${SRC_DIR}/time/timeperiod.cc
${SRC_DIR}/time/timerange.cc
${SRC_DIR}/time/timezone_locker.cc
${SRC_DIR}/time/timezone_manager.cc

# Headers.
${INC_DIR}/bbdo/acceptor.hh
${INC_DIR}/bbdo/connector.hh
${INC_DIR}/bbdo/factory.hh
${INC_DIR}/bbdo/internal.hh
${INC_DIR}/bbdo/stream.hh
${INC_DIR}/broker_impl.hh
${INC_DIR}/brokerrpc.hh
${INC_DIR}/compression/factory.hh
${INC_DIR}/compression/opener.hh
${INC_DIR}/compression/stack_array.hh
${INC_DIR}/compression/stream.hh
${INC_DIR}/config/applier/endpoint.hh
${INC_DIR}/config/applier/init.hh
${INC_DIR}/config/applier/modules.hh
${INC_DIR}/config/applier/state.hh
${INC_DIR}/config/endpoint.hh
${INC_DIR}/config/parser.hh
${INC_DIR}/config/state.hh
${INC_DIR}/database_config.hh
${INC_DIR}/exceptions/config.hh
${INC_DIR}/exceptions/interrupt.hh
${INC_DIR}/exceptions/shutdown.hh
${INC_DIR}/exceptions/timeout.hh
${INC_DIR}/file/cfile.hh
${INC_DIR}/file/directory_event.hh
${INC_DIR}/file/directory_watcher.hh
${INC_DIR}/file/factory.hh
${INC_DIR}/file/fifo.hh
${INC_DIR}/file/fs_file.hh
${INC_DIR}/file/opener.hh
${INC_DIR}/file/splitter.hh
${INC_DIR}/file/stream.hh
${INC_DIR}/instance_broadcast.hh
${INC_DIR}/io/data.hh
${INC_DIR}/io/endpoint.hh
${INC_DIR}/io/limit_endpoint.hh
${INC_DIR}/io/event_info.hh
${INC_DIR}/io/events.hh
${INC_DIR}/io/factory.hh
${INC_DIR}/io/protocols.hh
${INC_DIR}/io/raw.hh
${INC_DIR}/io/stream.hh
${INC_DIR}/mapping/entry.hh
${INC_DIR}/mapping/property.hh
${INC_DIR}/mapping/source.hh
${INC_DIR}/misc/diagnostic.hh
${INC_DIR}/misc/filesystem.hh
${INC_DIR}/misc/misc.hh
${INC_DIR}/misc/perfdata.hh
${INC_DIR}/misc/processing_speed_computer.hh
${INC_DIR}/misc/shared_mutex.hh
${INC_DIR}/misc/string.hh
${INC_DIR}/misc/time.hh
${INC_DIR}/misc/trash.hh
${INC_DIR}/misc/variant.hh
${INC_DIR}/modules/handle.hh
${INC_DIR}/mysql.hh
${INC_DIR}/pool.hh
${INC_DIR}/database/mysql_bulk_bind.hh
${INC_DIR}/database/mysql_column.hh
${INC_DIR}/database/mysql_error.hh
${INC_DIR}/mysql_manager.hh
${INC_DIR}/database/mysql_result.hh
${INC_DIR}/database/mysql_stmt_base.hh
${INC_DIR}/database/mysql_stmt.hh
${INC_DIR}/database/mysql_bulk_stmt.hh
${INC_DIR}/database/mysql_task.hh
${INC_DIR}/database/table_max_size.hh
${INC_DIR}/mysql_connection.hh
${INC_DIR}/query_preparator.hh
${INC_DIR}/persistent_cache.hh
${INC_DIR}/persistent_file.hh
${INC_DIR}/processing/acceptor.hh
${INC_DIR}/processing/failover.hh
${INC_DIR}/processing/feeder.hh
${INC_DIR}/processing/stat_visitable.hh
${INC_DIR}/stats/helper.hh
${INC_DIR}/time/daterange.hh
${INC_DIR}/time/ptr_typedef.hh
${INC_DIR}/time/time_info.hh
${INC_DIR}/time/timeperiod.hh
${INC_DIR}/time/timerange.hh
${INC_DIR}/time/timezone_locker.hh
${INC_DIR}/time/timezone_manager.hh
${INC_DIR}/timestamp.hh
${INC_DIR}/vars.hh
${INC_DIR}/version.hh)

# Static libraries.
add_library(rokerlog STATIC ${SRC_DIR}/log_v2.cc)
Expand Down Expand Up @@ -505,6 +501,7 @@ target_link_libraries(roker rokerbase dl CONAN_PKG::openssl CONAN_PKG::grpc

# Standalone binary.
add_executable(cbd ${SRC_DIR}/main.cc)
add_dependencies(cbd multiplexing)

# Flags needed to include all symbols in binary.
target_link_libraries(
Expand All @@ -514,6 +511,7 @@ target_link_libraries(
"-Wl,--whole-archive"
rokerbase
roker
multiplexing
"-Wl,--no-whole-archive"
CONAN_PKG::nlohmann_json
CONAN_PKG::fmt
Expand Down Expand Up @@ -552,6 +550,9 @@ add_broker_module(TLS2 OFF)
add_broker_module(DUMP OFF)
add_broker_module(GRPC ON)

# multiplexing library linked in final executable such as cbd or cbmod
add_subdirectory(core/multiplexing)

# Lua module.
option(WITH_MODULE_LUA "Build lua module." ON)

Expand Down
Loading

0 comments on commit 396aad5

Please sign in to comment.