From 1588876ee3493c123a1c5452a1fdcd8fd9e1e077 Mon Sep 17 00:00:00 2001 From: hobbes1069 Date: Fri, 24 Feb 2017 15:12:08 +0000 Subject: [PATCH] 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 --- codec2-dev/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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") -- 2.25.1