X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8d00a11d518c329ff699505e9b98444abc485bbb..54619b8b26db4a3a50596f07f233078b9e2adcab:/tools/cmake/GCCFlags.cmake diff --git a/tools/cmake/GCCFlags.cmake b/tools/cmake/GCCFlags.cmake index d9ae691b0f..2b86e58f5f 100644 --- a/tools/cmake/GCCFlags.cmake +++ b/tools/cmake/GCCFlags.cmake @@ -28,7 +28,8 @@ if(enable_compile_warnings) # 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 - set(warnCFLAGS "${warnCFLAGS} -wd1418 -wd191 -wd3179") + # 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") @@ -84,10 +85,6 @@ if(enable_compile_optimizations AND CMAKE_COMPILER_IS_GNUCC # This is redundant (already in -03): set(optCFLAGS "${optCFLAGS} -finline-functions ") endif() -if (CMAKE_C_COMPILER_ID MATCHES "Intel") - # honor parentheses when determining the order of expression evaluation. - set(optCFLAGS "${optCFLAGS} -fprotect-parens ") -endif() # Do not leak the current directory into the binaries if(CMAKE_COMPILER_IS_GNUCC) @@ -177,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}")