libcaption
libcaption copied to clipboard
Specifies C version to enable compiling in certain Linux flavors
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.
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)
Excellent point, I've updated the branch. (Assumed you meant the second test to be VERSION_GREATER.)