From e7c128f0d3e3ee9f556c6c682d1df436406bff3c Mon Sep 17 00:00:00 2001 From: Bhaskar <1994bm@gmail.com> Date: Mon, 26 Jun 2017 18:27:07 +0530 Subject: [PATCH] Flag edit for compiling in older cmake Added another flag arguement so that the code compiles in older versions of cmake with the c99 gnu option. Otherwise there will be errors for each case where a for loop has been declared like this: for(int i;...) this is not valid for older c-standards. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9eb9e07..cda26a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ cmake_minimum_required(VERSION 2.6) project(flow_solver) -set(CMAKE_C_FLAGS "-g -Wall") +set(CMAKE_C_FLAGS "-g -Wall --std=gnu99") add_executable(flow_solver flow_solver.c)