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

Clean up setting of C++ standard #462

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Clean up setting of C++ standard #462

merged 2 commits into from
Oct 22, 2024

Conversation

cwsmith
Copy link
Contributor

@cwsmith cwsmith commented Oct 22, 2024

This PR adds a 'bob' cmake helper function to set the C++ standard. The modifications do not change the default behavior of using C++11. The user is given the ability to increase the standard to > C++11, or enable the use of extensions, by passing CMAKE_CXX_STANDARD and CMAKE_CXX_EXTENSIONS, respectively, to cmake.

Closes #448.

@cwsmith cwsmith changed the base branch from master to develop October 22, 2024 16:50
Added a 'bob' cmake helper function to set the C++ standard. The
modifications do not change the default behavior of using C++11. The
user is given the ability to increase the standard to > C++11, or enable
the use of extensions, by passing CMAKE_CXX_STANDARD and
CMAKE_CXX_EXTENSIONS, respectively, to cmake.

Following approach given in "Professional CMake: 19th Edition".
@cwsmith
Copy link
Contributor Author

cwsmith commented Oct 22, 2024

/runtests

@cwsmith cwsmith added the v2.2.9 label Oct 22, 2024
Copy link

Build Log
Simmetrix Test Result: success
Simmetrix + CGNS Test Result: failure

calling it more than once could be done if the standard was decreased, otherwise, the check against CMAKE_CXX_STANDARD will fail
@cwsmith
Copy link
Contributor Author

cwsmith commented Oct 22, 2024

/runtests

Copy link

Build Log
Simmetrix Test Result: success
Simmetrix + CGNS Test Result: success

@cwsmith cwsmith merged commit e39d19b into develop Oct 22, 2024
4 checks passed
@cwsmith cwsmith deleted the cws/cxx14cmake branch October 22, 2024 18:57
@cwsmith cwsmith mentioned this pull request Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use CMAKE_CXX_STANDARD to set C++14 standard
1 participant