Use CMAKE_CXX_STANDARD when available#953
Conversation
If the use has provided the variable CMAKE_CXX_STANDARD use that instead of providing a default cache variable.
|
This change does a couple of things. It creates a cmake module to assist in writing helper functions/macros. Creates 2 new function:
gsl_set_default_cxx_standard does exactly what the old code did before. gsl_client_set_cxx_standard checks if the client set the CMAKE_CXX_STANDARD. If the client has set CMAKE_CXX_STANDARD then we should avoid doing anything else.
|
|
Seems like the IOS builds have been failing for a while. And aren't related to this PR. |
|
Yeah, the iOS failures are unrelated. I'm not sure why the Appveyor run exploded like that. |
|
These changes look good to me. In general, I prefer refactoring changes and functional changes separated in different commits, but this is just a nit :) |
|
I looked into the Appveyor failure since it's happening across all builds. There's no issue with this PR and as far as I can tell your changes work, so I'm going to merge it. (I am by no means a CMake expert though) In case anyone is interested in the Appveyor failure. |
If the use has provided the variable CMAKE_CXX_STANDARD use that instead of providing a default cache variable.