-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Set C11 standard in CMake examples #5014
Conversation
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.
Need to determine if this is a problem for older library versions.
@@ -31,13 +31,13 @@ macro (BASIC_SETTINGS varname) | |||
set (CMAKE_MFC_FLAG 0) | |||
endif () | |||
|
|||
set (CMAKE_C_STANDARD 99) | |||
set (CMAKE_C_STANDARD 11) |
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.
The examples need to work for all versions of the library - should this be conditional on the lib version?
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.
We can leave it at 99. I don't think the current examples do anything special for C11.
@@ -32,7 +32,7 @@ endif () | |||
if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND CMAKE_CXX_COMPILER_LOADED) | |||
if (NOT DEFINED CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION) | |||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13) | |||
if (NOT CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD EQUAL 98) | |||
if (NOT CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD EQUAL 11) |
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.
This is fine for the library.
Closed due to consensus at standup. Examples should not require C11 |
See also #4975.