From: Arnaud Giersch Date: Thu, 12 May 2022 15:59:35 +0000 (+0200) Subject: Fix build with Eigen3 and Imtel compiler. X-Git-Tag: v3.32~245 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/76ec29f832083ef95c56afbd1e11fc29856a0770 Fix build with Eigen3 and Imtel compiler. --- diff --git a/tools/cmake/Flags.cmake b/tools/cmake/Flags.cmake index 5afc1f0837..de55de01d4 100644 --- a/tools/cmake/Flags.cmake +++ b/tools/cmake/Flags.cmake @@ -191,7 +191,8 @@ endif() if (CMAKE_C_COMPILER_ID MATCHES "Intel") # honor parentheses when determining the order of expression evaluation. - set(optCFLAGS "${optCFLAGS} -fprotect-parens ") + # disallow optimizations for floating-point arithmetic with Nans or +-Infs (breaks Eigen3) + set(optCFLAGS "${optCFLAGS} -fprotect-parens -fno-finite-math-only") endif() if(NOT enable_debug)