Skip to content
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

Benchmark redefines CHECK() in glog #62

Closed
eddyxu opened this issue Oct 26, 2014 · 3 comments · Fixed by #63
Closed

Benchmark redefines CHECK() in glog #62

eddyxu opened this issue Oct 26, 2014 · 3 comments · Fixed by #63
Assignees
Labels

Comments

@eddyxu
Copy link
Contributor

eddyxu commented Oct 26, 2014

Since benchmark/macros.h defines CHECK_XXX, it prevents to use both glog/logging.h and benchmark/benchmark.h in the same file.

@dmah42
Copy link
Member

dmah42 commented Oct 29, 2014

I'm trying to think what the right solution is here.

Maybe benchmark should explicitly depend on glog and use the macros from there directly.

Another option is to check if they're defined before defining them.

I think I prefer the first, but I'm open to other thoughts!

@dmah42 dmah42 self-assigned this Oct 29, 2014
@dmah42 dmah42 added the bug label Oct 29, 2014
@ckennelly
Copy link
Contributor

Is it even necessary to export the CHECK_XXX macros at all in the header file? These are being used internally rather than in benchmark.h.

@dmah42
Copy link
Member

dmah42 commented Nov 1, 2014

They are used in benchmark_test.cc which doesn't (yet!) depend on googletest. Maybe it should ;)

dmah42 added a commit that referenced this issue Nov 1, 2014
CHECK_* are now private and used internally in the library. The test
uses have been replaced with asserts.

Fixes #62.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants