-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1605 fmt custom namespace #1618
Conversation
PR tests (gcc-7, ubuntu, mpich, trace runtime, LB) Build for 8c07571
|
There are some nvcc errors to be fixed. |
It seems that nvcc is unable to handle definitions with spaces. I also observed that definition defined within vt's cmake was "leaked" into my test app, where I wanted to use different fmt. Currently I just hardcoded vt namespace in fmt code. It's just two places in core.h that needed modification, and it fixes both problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently I just hardcoded vt namespace in fmt code. It's just two places in core.h that needed modification, and it fixes both problems.
Looks good to me, imho that's acceptable "manual" maintenance burden.
Yes, in case of fmt update, that's literally two characters that need to be changed. |
1ceb50d
to
9da07ed
Compare
9a9dd4d
to
ecd86ac
Compare
ecd86ac
to
3dbe5af
Compare
Fixes #1605
fmt
has macrosFMT_BEGIN_NAMESPACE
andFMT_END_NAMESPACE
, but unfortunately, internally it explicitly uses full namespace (in core.h):To use it, we would have to hardcode our namespace anyway.
To solve this I extracted this "inner" namespace into an additional macro, so it could be simply defined in cmake.
I opened an issue in fmt repo regarding this problem
fmtlib/fmt#2642
Everything above is no longer valid. fmt team remove qualifying by inline namespace from
core.h
.I copied their fix into our
fmt/core.h
and defineFMT_BEGIN_NAMESPACE
andFMT_END_NAMESPACE
.