X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/aede22de548259a464b58ed858f34db8a7ff45ae..cf1d9f104696ecb95c62c136aa47f90fb28c6762:/tools/cmake/Flags.cmake diff --git a/tools/cmake/Flags.cmake b/tools/cmake/Flags.cmake index 5afc1f0837..6fdaa31346 100644 --- a/tools/cmake/Flags.cmake +++ b/tools/cmake/Flags.cmake @@ -84,6 +84,12 @@ if(enable_compile_optimizations) else() set(optCFLAGS "-O0 ") endif() + +#ARM platforms have signed char by default, switch to unsigned for consistancy +if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64") + set(optCFLAGS "${optCFLAGS} -fsigned-char") +endif() + if(enable_compile_optimizations AND CMAKE_COMPILER_IS_GNUCC AND (NOT enable_model-checking)) # This is redundant (already in -03): @@ -191,7 +197,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)