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

CMake: Enable projects to set the C++ version #10464

Merged
merged 1 commit into from
Sep 7, 2022

Conversation

cblichmann
Copy link
Contributor

This change enables projects that consume protobuf via
FetchContent_MakeAvailable() to set the C++ version to be used. This is
necessary, as linking code compiled for different C++ standards is asking for
trouble (and will simply not work in some cases).

Check that any version that might be set in CMAKE_CXX_STANDARD is new
enough (C++14 or later). On Cygwin, check if any -std=gnu++XX has
already been set. In all cases, default to C++14.

This change enables projects that consume protobuf via
`FetchContent_MakeAvailable()` to set the C++ version to be used. This is
necessary, as linking code compiled for different C++ standards is asking for
trouble (and will simply not work in some cases).

Check that any version that might be set in `CMAKE_CXX_STANDARD` is new
enough (C++14 or later). On Cygwin, check if any `-std=gnu++XX` has
already been set. In all cases, default to C++14.
@cblichmann
Copy link
Contributor Author

Friendly ping, is there anything missing?

@ericsalo
Copy link
Member

ericsalo commented Sep 6, 2022

Hi Christian. Most of the protobuf team was away at an offsite last week so progress on PRs has been slow. Things should start to speed up again now.

@acozzette acozzette merged commit 4efbcc4 into protocolbuffers:main Sep 7, 2022
@acozzette
Copy link
Member

@cblichmann Thanks and sorry for the delay!

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

Successfully merging this pull request may close these issues.

4 participants