From: hobbes1069 Date: Fri, 24 Feb 2017 15:12:08 +0000 (+0000) Subject: Update C standard flag logic as gnu99 is the minimum required. X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=1588876ee3493c123a1c5452a1fdcd8fd9e1e077;p=freetel-svn-tracking.git Update C standard flag logic as gnu99 is the minimum required. git-svn-id: https://svn.code.sf.net/p/freetel/code@3052 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/CMakeLists.txt b/codec2-dev/CMakeLists.txt index bef9ad18..12b68b37 100644 --- a/codec2-dev/CMakeLists.txt +++ b/codec2-dev/CMakeLists.txt @@ -55,9 +55,7 @@ endif() include(CheckCCompilerFlag) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -O3") CHECK_C_COMPILER_FLAG("-std=gnu11" COMPILER_SUPPORTS_GNU11) -if(COMPILER_SUPPORTS_GNU11) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11") -else() +if(CMAKE_C_STANDARD_COMPUTED_DEFAULT EQUAL "90") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") endif() # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function")