googletest
googletest copied to clipboard
[Bug]: Undeclared GOOGLETEST_VERSION variable causes CMake build failure
Describe the issue
When following the instructions as per this readme: https://github.com/google/googletest/blob/main/googletest/README.md I noticed that there is a variable known as GOOGLETEST_VERSION used in line 50 of the CMakeLists.txt but this variable is not declared anywhere in the file causing the build to fail. Once the user declares this variable, the build succeeds. Is it possible to update your documentation to advise users to manually specify the GOOGLETEST_VERSION variable?
Steps to reproduce the problem
Variable GOOGLETEST_VERSION used in Line 50 but is not declared causing the build to fail.
What version of GoogleTest are you using?
Version 1.13.0
What operating system and version are you using?
Using Ubuntu 22.04.2 LTS
What compiler and version are you using?
gcc 11.3.0
What build system are you using?
cmake version 3.22.1
Additional context
No response
Same here, both googletests
and googlemock
needs to be built with cmake .. -DGOOGLETEST_VERSION=1.13.0
@dinord @derekmauro I've provided a potential fix for this issue in the pull request above. Please review and tell me whether you're okay with the way I fixed it.