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]: container test_allocator should be skipped if testing is disabled #1717

Closed
here-abarany opened this issue Jul 16, 2024 · 4 comments
Closed

Comments

@here-abarany
Copy link

Describe the issue

If testing is disabled, I would expect all dependencies on googletest to be removed. However, the internal test_allocator target inside of the container directory still gets created, which expects the GTest::gmock target to exist. As a result, if googletest isn't available, a CMake error will be raised due to the gmock target not existing.

Steps to reproduce the problem

Run CMake with testing disabled on a system without googletest installed.

What version of Abseil are you using?

20240116 (as part of protobuf)

What operating system and version are you using?

Windows 10

What compiler and version are you using?

Microsoft (R) C/C++ Optimizing Compiler Version 19.40.33812 for x86

What build system are you using?

cmake version 3.30.0

Additional context

No response

@aiusepsi
Copy link

I'm seeing the same thing. I suspect that a change in a recent version of cmake (possibly 3.30.0) as identical code built with earlier versions of CMake isn't failing.

It seems that the problem is fixed in the main branch, c.f. these issues:
open-telemetry/opentelemetry-cpp#2998
#1536

Alternatively, commenting out line 215 "GTest::gmock" in absl/container/CMakeLists.txt works.

@jschueller
Copy link

jschueller commented Jul 18, 2024

see #1536

@k0T0z
Copy link

k0T0z commented Aug 3, 2024

Alternatively, commenting out line 215 "GTest::gmock" in absl/container/CMakeLists.txt works.

Thanks

@derekmauro
Copy link
Member

It looks like this has been fixed.

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

No branches or pull requests

5 participants