google / google/googletest

[Bug]: CMake Quickstart: policy CMP0135 is not set.

Open
#4,289 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
39.5k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

### Describe the issue

CMake Quickstart:
When building per instructions, after exectuting: cmake -S . -B build

"CMake Warning (dev) at /usr/share/cmake-3.24/Modules/FetchContent.cmake:1267 (message):
The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
not set. "

### Steps to reproduce the problem

https://github.com/Nickrader/GTestCMakeQuickstart

### What version of GoogleTest are you using?

Latest to fix error.

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

Lubuntu 22.10

### What compiler and version are you using?

gcc version 12.2.0 (Ubuntu 12.2.0-3ubuntu1)

### What build system are you using?

cmake version 3.24.2

### Additional context

Unsure about implementation of fix.
Simple enough to use latest commit and GIT_REPOSITORY, GIT_TAG.

To use URL it seems setting CMP0135 to NEW would be solution, based on other similar problems/solutions. Unsure where to set, as error didn't point to source code in Googletest.

Contributor guide

Open the contributing guide

Research direction

Start with the CMake Quickstart instructions and the linked GTestCMakeQuickstart reproduction, then run `cmake -S . -B build` to confirm the CMP0135 warning. Review how the quickstart uses FetchContent and whether the URL or GIT_REPOSITORY approach is intended; done means the documented build completes without this policy warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.