X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2d042d8e1b91807d34d08168fdcf417c2f7cb685..bfffef69e1b0554d13eec920f1a32f75b49ceac6:/tools/cmake/Flags.cmake?ds=sidebyside diff --git a/tools/cmake/Flags.cmake b/tools/cmake/Flags.cmake index 5ec57539b0..b6e6222678 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") + endif() endif() if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") @@ -77,9 +81,10 @@ if(enable_compile_warnings AND enable_debug) endif() # Activate the warnings on #if FOOBAR when FOOBAR has no value -# It used to break on FreeBSD within Boost headers and was only activated in maintainer mode, but I hope it works nowadays -set(warnCFLAGS "${warnCFLAGS} -Wundef") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wundef") +if("${CMAKE_SYSTEM}" MATCHES "Linux") # Breaks on FreeBSD within Boost headers :( + set(warnCFLAGS "${warnCFLAGS} -Wundef") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wundef") +endif() # Set the optimisation flags # NOTE, we should CMAKE_BUILD_TYPE for this