From 665007b61f3c7610e794a37162dfdbdcf1021529 Mon Sep 17 00:00:00 2001 From: "jenkins@kakwa.fr" Date: Mon, 24 Jul 2017 17:53:14 -0400 Subject: [PATCH] fix version of C standard to use --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f5c4826..43dcdd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,14 @@ cmake_minimum_required (VERSION 2.6) project (uts-server) include(ExternalProject) +if (CMAKE_VERSION VERSION_LESS "3.1") + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") + set (CMAKE_C_FLAGS "--std=gnu99 ${CMAKE_C_FLAGS}") + endif () +else () + set (CMAKE_C_STANDARD 99) +endif () + set(VERSION 0.1.8) option(DEBUG "compile with debug symbol" OFF)