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

[Bug]: Undeclared GOOGLETEST_VERSION variable causes CMake build failure #4309

Open
jeffmachyo opened this issue Jul 7, 2023 · 2 comments · May be fixed by #4539
Open

[Bug]: Undeclared GOOGLETEST_VERSION variable causes CMake build failure #4309

jeffmachyo opened this issue Jul 7, 2023 · 2 comments · May be fixed by #4539
Assignees

Comments

@jeffmachyo
Copy link

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

gtest_cmake_error

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

@jvillasante
Copy link

Same here, both googletests and googlemock needs to be built with cmake .. -DGOOGLETEST_VERSION=1.13.0

@tobbi
Copy link
Contributor

tobbi commented May 14, 2024

@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.

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

Successfully merging a pull request may close this issue.

4 participants