Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Another attempt at fixing the Flag2 job of jenkins
[simgrid.git] / tools / cmake / Flags.cmake
index b058f8e..21213be 100644 (file)
@@ -41,6 +41,10 @@ if(enable_compile_warnings)
       # workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81767
       set(warnCXXFLAGS "${warnCXXFLAGS} -Wno-error=unused-variable")
     endif()
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "13.2.0")
+      # workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101361
+      set(warnCXXFLAGS "${warnCXXFLAGS} -Wno-error=stringop-overread -Wno-error=stringop-overflow")
+    endif()
   endif()
 
   if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
@@ -77,8 +81,7 @@ if(enable_compile_warnings AND enable_debug)
 endif()
 
 # Activate the warnings on #if FOOBAR when FOOBAR has no value
-# It breaks on FreeBSD within Boost headers, so activate this only in Pure Hardcore debug mode.
- if(enable_maintainer_mode)
+if("${CMAKE_SYSTEM}" MATCHES "Linux") # Breaks on FreeBSD within Boost headers :(
   set(warnCFLAGS "${warnCFLAGS} -Wundef")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wundef")
 endif()