X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a379f8a8381c6acf5ef1b29bca69cd758410c4c6..6a17d773484b05eb5d041babda0b346350b9ae72:/tools/cmake/GCCFlags.cmake?ds=sidebyside diff --git a/tools/cmake/GCCFlags.cmake b/tools/cmake/GCCFlags.cmake index 8b4b980a15..2b86e58f5f 100644 --- a/tools/cmake/GCCFlags.cmake +++ b/tools/cmake/GCCFlags.cmake @@ -24,6 +24,13 @@ if(enable_compile_warnings) if(CMAKE_COMPILER_IS_GNUCC) set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wno-error=clobbered -Wno-unused-local-typedefs -Wno-error=attributes") endif() + if (CMAKE_CXX_COMPILER_ID MATCHES "Intel") + # ignore remark #1418: external function definition with no prior declaration + # 3179: deprecated conversion of string literal to char* (should be const char*) + # 191: type qualifier is meaningless on cast type + # 597: entity-kind "entity" will not be called for implicit or explicit conversions + set(warnCFLAGS "${warnCFLAGS} -wd1418 -wd191 -wd3179 -ww597") + 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"))) @@ -167,6 +174,11 @@ if(enable_model-checking AND enable_compile_optimizations) endforeach() endif() +if (CMAKE_C_COMPILER_ID MATCHES "Intel") + # honor parentheses when determining the order of expression evaluation. + set(optCFLAGS "${optCFLAGS} -fprotect-parens ") +endif() + if(NOT enable_debug) set(CMAKE_C_FLAGS "-DNDEBUG ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "-DNDEBUG ${CMAKE_CXX_FLAGS}")