Conversation
|
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
|
|
No CLA |
63962b2 to
b7fcea3
Compare
|
CLAs look good, thanks! |
|
This introduces dependency on GOOGLETEST_VERSION which is not documented anywhere. CMake support is community-only however it would be good to understand exactly *why we are making these changes. |
GOOGLETEST_VERSION is a simple and straightforward CMAKE variable already used in several places. (1) It's set in main CMakeLists.txt, see Lines 15 to 16 in 478a518 (2) It's used in all CMakeList.txt in subdirectories: googletest/googlemock/CMakeLists.txt Lines 36 to 42 in 50f1a77 googletest/googletest/CMakeLists.txt Lines 43 to 49 in e908576
As people say on WikiTravel, No advice from Captain Obvious. Seriously, though, this variable is not part of any API to be maintained. It is an implementation detail in the current implementation of the CMake scaffolding of the project.
In order to generate the Search for alternativeThe fact is, in the case of a CMake <3.0, the CMakeLists.txt does not include version information in project (see snippet above). This change is the simplest one that provides the version number to I tried to include ConclusionI think we can confidently say the change in this PR is:
|
|
Thank you for the explanation. Thanks
|
Thanks for merging the PR.
I'm surprised by your question. I would expect any maintainer looking working towards a newer release in such a context to look at the CMakeList.txt, see that variable and increment it when applicable.
It might be or not at all, depending on project conventions. This is master branch right after 1.8.x and the README.md announces 1.9.x. Bumping the version number in master branch just after a release to distinguish the code from the latest release is an existing practice (see https://stackoverflow.com/a/40884130/1429390 for the first example Google search suggested just now). So, seems sane to me. Some project adopts different practices. |
The reason I am asking is that we do not use CMake at all. CMake is completely community supported for googletest . Therefore if this variable is expected ( please do be careful when making assumptions about releases, semantic versioning and such ) to play any role in the release process whatsoever there has to be something documented to this effect . What is going to happen with the next release is that at some point we will cut the branch 1.9.x and tag it. That is it. , which would make anything based on this variable instantly wrong |
Thank you for those explanations. It makes much more sense now.
Given the context, that's a totally valid point. It is possible in CMake to automatically compute the value of the variable, based on Is it a good idea some day to open an issue titled like "CMake variable GOOGLETEST_VERSION is fixed, not computed from non-CMake-specific information" and offer a PR? I'll also offer to add some comments on top of the CMakeLists.txt to make clear that bazel is primary build system and CMake is community supported. Thanks for the explanation and keep up the good work! I guess you can close this issue now. |
|
@fidergo-stephane-gourichon Thank you very much. Yes I agree that
This would be a worthy thing to do and if you could take a look and propose a PR this would be welcomed. In addition your idea to add some comments on top of the >>CMakeLists.txt to make clear that bazel is primary build system and CMake is community supported sounds great.. If you have some time a PR would be welcomed as well Thanks again |
|
Closing for now, hoping to see PRs as described, thank you again |

Proper PR for issue #1786 as requested on #1786 .
The fix by @athrun22 works here and allows CMake to complete.