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

Use C++11 as minimal required only #71

Merged
merged 1 commit into from
May 16, 2024

Conversation

uilianries
Copy link
Contributor

Hello, this PR adds the ability of choosing the C++ standard used when building the project. So far, it's configured to C++11 only, not giving the chance of using newer C++ standards like 14, 17 and 20.

We discovered this behavior when packaging the BMX project into Conan: conan-io/conan-center-index#23955

As we run the CI with different C++ standards, we noted was not possible to use a different version of C++.

The target_compile_features passes the required standard cxx_std_11 but does not impose as unique supported version. In case passing -DCMAKE_CXX_STANDARD=14, CMake will use C++14 instead.

@philipnbbc philipnbbc self-requested a review May 16, 2024 16:07
Copy link
Collaborator

@philipnbbc philipnbbc left a comment

Choose a reason for hiding this comment

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

Thanks, the changes look good to me. Your links were useful to understand it as was Requiring Language Standards. I also see why you put it in the library CMakeList.txt because it relates to a library target.

@philipnbbc philipnbbc merged commit 983439b into bbc:main May 16, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants