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)