Skip to content

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

Merged
felixhandte merged 2 commits intofacebook:devfrom
felixhandte:pzstd-max-cpp-std
Mar 27, 2023
Merged

[contrib/pzstd] Select -std=c++11 When Default is Older#3574
felixhandte merged 2 commits intofacebook:devfrom
felixhandte:pzstd-max-cpp-std

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