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

Drop support for intermediate standards in CMake #2336

Closed
jjwilke opened this issue Sep 13, 2019 · 3 comments
Closed

Drop support for intermediate standards in CMake #2336

jjwilke opened this issue Sep 13, 2019 · 3 comments

Comments

@jjwilke
Copy link

jjwilke commented Sep 13, 2019

I don't think we need users to specify 1Y, 1Z, or 2A to get intermediate standards.
CMake is smart enough (in this case) to recognize when a compiler version has partial support and will "downgrade" 20 -> 2a, 17 -> 1z, and 14 -> 1y where appropriate.

This occurs, for example, with GCC 6,7 where you can request 17 but will get -std=c++1z.

After nvcc_wrapper fixes, this means we can ALWAYS set -std flags as compiler features without choosing flags. This finally fixes the supreme annoyance of multiple -std flags in downstream projects in all cases.

@jjwilke
Copy link
Author

jjwilke commented Sep 13, 2019

Related to issue #2317 and PR #2311

@jjwilke
Copy link
Author

jjwilke commented Sep 13, 2019

We will have to be careful with versions here. If we get a request for C++20, we need to make sure we have CMake >= 3.12.

jjwilke pushed a commit to jjwilke/kokkos that referenced this issue Sep 19, 2019
@masterleinad masterleinad added this to To do in Milestone: Release 3.1 via automation Oct 4, 2019
@jjwilke jjwilke closed this as completed Mar 4, 2020
Milestone: Release 3.1 automation moved this from To do to Done Mar 4, 2020
@jjwilke
Copy link
Author

jjwilke commented Mar 4, 2020

The only allowed inputs now are 11, 14, 17, and 20. The user would never ask for 1Y, 1Z, or 2A. There is some internal logic if Kokkos is forced to pick the flag itself (doesn't get one from CMake) that still handles intermediate standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

1 participant