Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add -std=gnu99 to compile flags.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 7 Jan 2014 14:15:12 +0000 (15:15 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 7 Jan 2014 14:16:26 +0000 (15:16 +0100)
That's the C dialect we're using anyway, and it allows initial
declarations in for loops.

buildtools/Cmake/Flags.cmake

index 24c7c97..eb9d3f4 100644 (file)
@@ -2,7 +2,7 @@ set(warnCFLAGS "")
 set(optCFLAGS "")
 
 if(NOT __VISUALC__ AND NOT __BORLANDC__)
 set(optCFLAGS "")
 
 if(NOT __VISUALC__ AND NOT __BORLANDC__)
-  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-g3")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-std=gnu99 -g3")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}-g3")
   set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g")
 else()
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}-g3")
   set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g")
 else()