-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix SOURCE_DIR in HandleGTest.cmake #703
Conversation
If benchmark added as cmake subproject, HandleGTest throws an error as does return absolute source dir. Change it to , so it will be refering to it's own source dir.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
CLA signed |
CLAs look good, thanks! |
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.
I think this is correct.
✅ Build benchmark 1521 completed (commit 15ead5e9da by @olzhabay) |
@olzhabay hm, thinking about it a bit more, you placed googletest into the |
Yes, googletest is place in |
I'm not sure i follow. I think the location where it looks for googletest should be a config option, thus any expectation can be valid. Also, i think you need to pass |
This patch is correct.
Assuming |
I think i'm failing to convey my thoughts here. |
Ah, OK. Yes we could do a lot better in supporting other configurations for googletest. But that's a separate discussion, and we should file a bug to track it. This patch is "correct" because it brings the implementation inline with the currently documented behavior, which says:
I'm merging this patch to make the behavior inline with the documentation. Lets continue the broader discussion elsewhere. |
@olzhabay Could you re-open this with your latest changeset? |
@LebedevRI Totally got your point. I added this option. So, now it can look to both myproject's dir and googlebenchmark's dir, if one of them has an googletest |
@EricWF sure |
Oh, i forgot about those docs. Ok, then that patch as it was is ok to go.
Not really what i meant. |
@olzhabay OK, so lets land your original fix first. And then we can explore improvements as a follow up PR. |
This reverts commit 6097523.
If benchmark added as cmake subproject, HandleGTest throws an error as does return absolute source dir. Change it to , so it will be refering to it's own source dir. Also see PR #703.
* Fix SOURCE_DIR in HandleGTest.cmake If benchmark added as cmake subproject, HandleGTest throws an error as does return absolute source dir. Change it to , so it will be refering to it's own source dir.
This reverts commit 6097523.
If benchmark added as cmake subproject, HandleGTest throws an error as does return absolute source dir. Change it to , so it will be refering to it's own source dir. Also see PR google#703.
* Fix SOURCE_DIR in HandleGTest.cmake If benchmark added as cmake subproject, HandleGTest throws an error as does return absolute source dir. Change it to , so it will be refering to it's own source dir.
This reverts commit 6097523.
If benchmark added as cmake subproject, HandleGTest throws an error as does return absolute source dir. Change it to , so it will be refering to it's own source dir. Also see PR google#703.
If benchmark added as cmake subproject, HandleGTest throws an error as
${CMAKE_SOURCE_DIR}
does return absolute source dir.Change it to
${CMAKE_CURRENT_SOURCE_DIR}
, so it will be refering to it's own source dir.