Skip to content

Specifies C version to enable compiling in certain Linux flavors#51

Open
nabeards wants to merge 2 commits into
szatmary:developfrom
nabeards:bugfix/specify_c_version
Open

Specifies C version to enable compiling in certain Linux flavors#51
nabeards wants to merge 2 commits into
szatmary:developfrom
nabeards:bugfix/specify_c_version

Conversation

@nabeards
Copy link
Copy Markdown

@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
Copy Markdown

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
Copy Markdown
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