Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
my g++ refuses -Wmissing-prototypes
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 28 May 2016 19:54:59 +0000 (21:54 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 28 May 2016 19:54:59 +0000 (21:54 +0200)
tools/cmake/GCCFlags.cmake

index 077e85a..9724561 100644 (file)
@@ -14,7 +14,7 @@ set(optCFLAGS "")
 set(warnCXXFLAGS "")
 
 if(enable_compile_warnings)
-  set(warnCFLAGS "-fno-common -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror")
+  set(warnCFLAGS "-fno-common -Wall -Wunused -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror")
   if(CMAKE_COMPILER_IS_GNUCC)
     set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wno-error=clobbered  -Wno-unused-local-typedefs -Wno-error=attributes")
   endif()
@@ -27,6 +27,9 @@ if(enable_compile_warnings)
     set(warnCXXFLAGS "${warnCXXFLAGS} -Wno-mismatched-tags")
   endif()
 
+  #┬áthe one specific to C but refused by C++
+  set(warnCFLAGS "${warnCFLAGS} -Wmissing-prototypes") 
+
   set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wall")
   set(CMAKE_JAVA_COMPILE_FLAGS "-Xlint")
 endif()