mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
feat: Make the channel AutoBind default configurable
This commit is contained in:
committed by
Alexey Rybalchenko
parent
42d27af20f
commit
bfc665d76e
@@ -174,6 +174,15 @@ if(BUILD_FAIRMQ)
|
||||
FAIRMQ_HAS_STD_FILESYSTEM=${FAIRMQ_HAS_STD_FILESYSTEM}
|
||||
FAIRMQ_HAS_STD_PMR=${FAIRMQ_HAS_STD_PMR}
|
||||
)
|
||||
if(DEFINED FAIRMQ_CHANNEL_DEFAULT_AUTOBIND)
|
||||
# translate CMake boolean (TRUE, FALSE, 0, 1, OFF, ON) into C++ boolean literal (true, false)
|
||||
if(FAIRMQ_CHANNEL_DEFAULT_AUTOBIND)
|
||||
set(value "true")
|
||||
else()
|
||||
set(value "false")
|
||||
endif()
|
||||
target_compile_definitions(${target} PUBLIC FAIRMQ_CHANNEL_DEFAULT_AUTOBIND=${value})
|
||||
endif()
|
||||
|
||||
|
||||
#######################
|
||||
|
@@ -379,7 +379,11 @@ class Channel
|
||||
static constexpr int DefaultRateLogging = 1;
|
||||
static constexpr int DefaultPortRangeMin = 22000;
|
||||
static constexpr int DefaultPortRangeMax = 23000;
|
||||
#ifdef FAIRMQ_CHANNEL_DEFAULT_AUTOBIND
|
||||
static constexpr bool DefaultAutoBind = FAIRMQ_CHANNEL_DEFAULT_AUTOBIND;
|
||||
#else
|
||||
static constexpr bool DefaultAutoBind = true;
|
||||
#endif
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const Channel& ch)
|
||||
{
|
||||
|
Reference in New Issue
Block a user