← All tasks
cppgoogle/googletest #4384Not a task: already works

[Bug]: CMake FetchContent_* does not work with GTest as dependency name on Windows

envgap__google__googletest-4384

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
b75ecf1bed2fcd416b66c86cb6fe79122abf132e
Manifest
googlemock/CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

google/googletest #4384 · read the original issue
### Describe the issue

CMake FetchContent_* does not work with GTest as dependency name. If the dependency name is changed to `googletest` or to `foobar` everything works as expected. This is very unfortunate because GTets is used in the `find_package` command of CMake and if this fails the FetchContent mechanism can be used as fallback. But not on windows as you can see here:



https://github.com/ObiWahn/googletest-CMake-FetchContent/pull/1

### Steps to reproduce the problem

https://github.com/ObiWahn/googletest-CMake-FetchContent/pull/1/files

### What version of GoogleTest are you using?

v.1.14.0

### What operating system and version are you using?

windows

### What compiler and version are you using?

msvc / clang

### What build system are you using?

cmake 3.27.6

### Additional context

_No response_
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]