Skip to content

Conversation

@nabeards
Copy link

@nabeards nabeards commented Nov 1, 2018

When compiling on CentOS 7, I need to have the C Standard specify for the build process to work properly.

I also fixed a very minor unit test warning by typecasting for the fprintf statement.

@embeddedguy1138
Copy link

Hi Neil,

The variable set(CMAKE_C_STANDARD 11) was introduced in CMake v3.1. In order to support older platforms (like mine with no C11), you may want to consider something like this:

if (CMAKE_VERSION VERSION_EQUAL "3.1" OR CMAKE_VERSION VERSION_EQUAL "3.1")
    set(CMAKE_C_STANDARD 11)

@nabeards
Copy link
Author

nabeards commented Nov 1, 2018

Excellent point, I've updated the branch.
(Assumed you meant the second test to be VERSION_GREATER.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants