X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/50724cb500bddb551877bf058171d22d34adc27a..9afa0d0db01da2ae64e48fb594cc87c186dde192:/tools/cmake/Flags.cmake diff --git a/tools/cmake/Flags.cmake b/tools/cmake/Flags.cmake index b058f8ef53..21213be8a3 100644 --- a/tools/cmake/Flags.cmake +++ b/tools/cmake/Flags.cmake @@ -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()