# OpenST uses C99 standard extensively
macro(SetStdC99)
  if(CMAKE_VERSION VERSION_LESS "3.1")
    if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
        set (CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}")
    endif()
    if(CMAKE_C_COMPILER_ID MATCHES "Intel" AND WIN32)
        set(CMAKE_C_FLAGS "/Qstd=c99 ${CMAKE_C_FLAGS}")
    endif()
  else()
    set(CMAKE_C_STANDARD 99)
  endif()
  set (CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}")
endmacro(SetStdC99)
