From: Arnaud Giersch Date: Fri, 16 Mar 2018 17:16:44 +0000 (+0100) Subject: Enable flag with MC too (optCFLAGS was reset before). X-Git-Tag: v3.19~27 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/54619b8b26db4a3a50596f07f233078b9e2adcab?ds=sidebyside Enable flag with MC too (optCFLAGS was reset before). --- diff --git a/tools/cmake/GCCFlags.cmake b/tools/cmake/GCCFlags.cmake index a235b8ffde..2b86e58f5f 100644 --- a/tools/cmake/GCCFlags.cmake +++ b/tools/cmake/GCCFlags.cmake @@ -85,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) @@ -178,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}")