-
Notifications
You must be signed in to change notification settings - Fork 45
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: Handle C++ standard selection and propagation via CMake features #300
Conversation
See trilinos/Trilinos#6814 for the Trilinos updates using this change to TriBITS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bradking, just to be clear, this really will just result in -std=c++11
being removed from CMAKE_CXX_FLAGS
including from Makefile.export.*
files? Therefore, I think this break backward compatibility for Makefile customers that use those files so we will need to note that in the ReleaseNotes.txt file. But this does not yet completely break Makefile.export.*
files as Makefile clients could just add back whatever -std=c++<xx>
flag they want. So this does not yet complete break that feature.
Therefore, I don't see any reason not to merge this PR along with trilinos/Trilinos#6814 and kokkos/kokkos#2749.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding comments from trilinos/Trilinos#6814 that I should have put in this PR.
I will need to carefully test this myself locally with Trilinos and against SPARC and EMPIRE before I merge this but this looks great.
Good. I've removed the |
TriBITS will be transitioned to always enable C++11 support using CMake's standard settings. Drop the option to turn it off. Hard-code a variable of the same name to "ON" to preserve compatibility while clients are updated.
C++11 is now required by TriBITS clients. Enable support unconditionally. Use CMake's standard settings for specifying the C++ standard and propagating it to dependents. Avoid hard-coding
-std=
flags, as doing so breaks CMake's model of the compiler's C++ standard modes.Drop the
${PROJECT_NAME}_ENABLE_CXX11
option and hard-code a variable of the same name to "ON" to preserve compatibility while clients are updated.