Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Tests also need the java tests and simgrid-mc
[simgrid.git] / tools / cmake / GCCFlags.cmake
index e15cbdb..de2b848 100644 (file)
@@ -18,11 +18,8 @@ if(enable_compile_warnings)
   if(CMAKE_COMPILER_IS_GNUCC AND (NOT (CMAKE_C_COMPILER_VERSION VERSION_LESS "5.0")))
     set(warnCFLAGS "${warnCFLAGS} -Wformat-signedness")
   endif()
-  if(CMAKE_C_COMPILER_ID MATCHES "Clang|GCC")
-    set(warnCFLAGS "${warnCFLAGS} -Wno-format-nonliteral")
-  endif()
   if(CMAKE_COMPILER_IS_GNUCC)
-    set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wno-error=clobbered  -Wno-unused-local-typedefs -Wno-error=attributes")
+    set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wno-error=clobbered  -Wno-unused-local-typedefs -Wno-error=attributes -Wno-error=maybe-uninitialized")
   endif()
   if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
     # ignore remark  #1418: external function definition with no prior declaration
@@ -36,11 +33,8 @@ if(enable_compile_warnings)
   if(CMAKE_COMPILER_IS_GNUCXX AND (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0")))
     set(warnCFLAGS "${warnCFLAGS} -Wformat-signedness")
   endif()
-  if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GCC")
-    set(warnCXXFLAGS "${warnCXXFLAGS} -Wno-format-nonliteral")
-  endif()
   if(CMAKE_COMPILER_IS_GNUCXX)
-    set(warnCXXFLAGS "${warnCXXFLAGS} -Wclobbered -Wno-error=clobbered  -Wno-unused-local-typedefs -Wno-error=attributes")
+    set(warnCXXFLAGS "${warnCXXFLAGS} -Wclobbered -Wno-error=clobbered  -Wno-unused-local-typedefs -Wno-error=attributes -Wno-error=maybe-uninitialized")
   endif()
   if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
     # don't care about class that become struct, avoid issue of empty C structs