Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics: gcc is now always >= 5.0.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 27 Apr 2022 19:58:42 +0000 (21:58 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 27 Apr 2022 19:58:42 +0000 (21:58 +0200)
tools/cmake/Flags.cmake

index 1df1195..3741f5f 100644 (file)
@@ -15,11 +15,8 @@ set(warnCXXFLAGS "")
 
 if(enable_compile_warnings)
   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")
-  if(CMAKE_COMPILER_IS_GNUCC AND (NOT (CMAKE_C_COMPILER_VERSION VERSION_LESS "5.0")))
-    set(warnCFLAGS "${warnCFLAGS} -Wformat-signedness")
-  endif()
   if(CMAKE_COMPILER_IS_GNUCC)
-    set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wno-error=clobbered  -Wno-unused-local-typedefs -Wno-error=attributes -Wno-error=maybe-uninitialized")
+    set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wformat-signedness -Wno-error=clobbered -Wno-unused-local-typedefs -Wno-error=attributes -Wno-error=maybe-uninitialized")
   endif()
   if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
     # ignore remarks:
@@ -36,11 +33,8 @@ if(enable_compile_warnings)
   endif()
 
   set(warnCXXFLAGS "${warnCFLAGS} -Wall -Wextra -Wunused -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing")
-  if(CMAKE_COMPILER_IS_GNUCXX AND (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0")))
-    set(warnCFLAGS "${warnCFLAGS} -Wformat-signedness")
-  endif()
   if(CMAKE_COMPILER_IS_GNUCXX)
-    set(warnCXXFLAGS "${warnCXXFLAGS} -Wclobbered -Wno-error=clobbered  -Wno-unused-local-typedefs -Wno-error=attributes -Wno-error=maybe-uninitialized")
+    set(warnCXXFLAGS "${warnCXXFLAGS} -Wclobbered -Wformat-signedness -Wno-error=clobbered -Wno-unused-local-typedefs -Wno-error=attributes -Wno-error=maybe-uninitialized")
   endif()
   if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0")
     # workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81767