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

[contrib/pzstd] Select -std=c++11 When Default is Older #3574

Merged
merged 2 commits into from
Mar 27, 2023

Conversation

felixhandte
Copy link
Contributor

Rather than remove the flag entirely, as proposed in #3499, this commit uses the newest C++ standard the compiler supports. This retains the selection of using only standardized features (excluding GNU extensions) and keeps the recency requirements of the codebase explicit.

Tested with various versions of g++ and clang++.

Rather than remove the flag entirely, as proposed in facebook#3499, this commit uses
the newest C++ standard the compiler supports. This retains the selection of
using only standardized features (excluding GNU extensions) and keeps the
recency requirements of the codebase explicit.

Tested with various versions of `g++` and `clang++`.
@Cyan4973
Copy link
Contributor

What benefit is there in selecting a C++ standard newer than C++11 ?

@felixhandte
Copy link
Contributor Author

As noted in #3499, newer gtest versions require >=C++14 (and pzstd tries to find a system-installed gtest for its tests).

Copy link
Contributor

@Cyan4973 Cyan4973 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@felixhandte felixhandte merged commit 93da041 into facebook:dev Mar 27, 2023
@felixhandte felixhandte changed the title [contrib/pzstd] Detect and Select Maximum Available C++ Standard [contrib/pzstd] Select -std=c++11 When Default is Older Mar 27, 2023
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.

3 participants