google / google/googletest

[Bug]: Undeclared GOOGLETEST_VERSION variable causes CMake build failure

Open
#4,309 2 comments 1 reaction 1 assignee View on GitHub

@derekmauro is already working on this.

Since Jul 10, 2023.

Dominant language
C++
Stars
39.6k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.