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]: CMake Quickstart: policy CMP0135 is not set. #4289

Open
Nickrader opened this issue Jun 19, 2023 · 3 comments · May be fixed by #4630
Open

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

Nickrader opened this issue Jun 19, 2023 · 3 comments · May be fixed by #4630
Assignees

Comments

@Nickrader
Copy link

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.

@Nickrader Nickrader changed the title [Bug]: Please title this bug report CMake Quickstart: policy CMP0135 Jun 19, 2023
@Nickrader Nickrader changed the title CMake Quickstart: policy CMP0135 CMake Quickstart: policy CMP0135 is not set. Jun 19, 2023
@Nickrader Nickrader changed the title CMake Quickstart: policy CMP0135 is not set. [Bug]: CMake Quickstart: policy CMP0135 is not set. Jun 20, 2023
@CosmicPegasis
Copy link

Steps to Reproduce

Using the given repo can't reproduce the problem.

cosmic@zack ~/c/c/p/GTestCMakeQuickstart (stable)> cmake -S . -B build
-- The C compiler identification is GNU 13.1.1
-- The CXX compiler identification is GNU 13.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python: /usr/bin/python3.11 (found version "3.11.3") found components: Interpreter 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Configuring done (43.4s)
-- Generating done (0.0s)
-- Build files have been written to: /home/cosmic/coding/cpp/playground/GTestCMakeQuickstart/build
  • cmake version: 3.26.4
  • gcc version: 13.1.1
  • OS: Arch Linux

@Nickrader
Copy link
Author

I probably shouldn't have the repository head point to my workaround.
Updated repo to point to error, made separate branch for workaround.

@dodohand
Copy link

I opened Pull Request #4630 to address this issue

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