Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix linkage of v2 domains with dynamically linked rlog #25

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ endif()
# =========================================
# global options

option(RICH_LOG_FORCE_MACRO_PREFIX "if true, only RICH_ macro versions are available" OFF)

option(RLOG_FORCE_MACRO_PREFIX "if true, only RICH_ macro versions are available" OFF)

# =========================================
# define library
Expand All @@ -30,6 +29,7 @@ target_link_libraries(rich-log PUBLIC
# =========================================
# set up compile flags

if (RICH_LOG_FORCE_MACRO_PREFIX)
# the second option is for backwards compatibility with the previous name
if (RLOG_FORCE_MACRO_PREFIX OR RICH_LOG_FORCE_MACRO_PREFIX)
target_compile_definitions(rich-log PUBLIC RICH_LOG_FORCE_MACRO_PREFIX)
endif()
4 changes: 3 additions & 1 deletion src/rich-log/domain.hh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ struct domain_info
char const* name = "";
char const* ansi_color_code = "\u001b[38;5;244m";

void* userdata = nullptr;

static constexpr domain_info make_named(char const* name)
{
domain_info di;
Expand Down Expand Up @@ -127,7 +129,7 @@ struct domain_info

namespace rlog::detail
{
struct domain_registerer
struct RLOG_API domain_registerer
{
domain_registerer(domain_info* domain);
};
Expand Down
1 change: 0 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ add_arcana_test(tests-rich-log "${SOURCES}")

target_link_libraries(tests-rich-log PUBLIC
clean-core
clean-ranges
typed-geometry
rich-log
)
2 changes: 2 additions & 0 deletions tests/basics.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <nexus/test.hh>

#undef RICH_LOG_FORCE_MACRO_PREFIX

#include <rich-log/log.hh>
#include <rich-log/logger.hh>

Expand Down
2 changes: 2 additions & 0 deletions tests/domains.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <nexus/test.hh>

#undef RICH_LOG_FORCE_MACRO_PREFIX

#include <rich-log/log.hh>
#include <rich-log/logger.hh>

Expand Down
2 changes: 2 additions & 0 deletions tests/logger.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <nexus/test.hh>

#undef RICH_LOG_FORCE_MACRO_PREFIX

#include <rich-log/log.hh>
#include <rich-log/logger.hh>

Expand Down
2 changes: 2 additions & 0 deletions tests/verbosity.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <nexus/test.hh>

#undef RICH_LOG_FORCE_MACRO_PREFIX

#include <rich-log/log.hh>
#include <rich-log/logger.hh>

Expand Down