]> https://gitweb.dealii.org/ - dealii.git/commit
CMake: enable -ffp-exceptions-behavior=strict when compiling with clang 15510/head
authorMatthias Maier <tamiko@43-1.org>
Tue, 27 Jun 2023 20:46:20 +0000 (15:46 -0500)
committerMatthias Maier <tamiko@43-1.org>
Tue, 27 Jun 2023 20:54:01 +0000 (15:54 -0500)
commit708ea5585f5253522a8de52bff087eeef75b9d67
treee7ba542e1982606ca51ad67839afc8186772d254
parentbe9a9247be94ca196d47128b1897207c7e288dc5
CMake: enable -ffp-exceptions-behavior=strict when compiling with clang

We have to ensure that we emit floating-point instructions in debug mode
that preserve the occurence of floating-point exceptions and don't
introduce new ones. gcc plays nicely in this regard by enabling
`-ftrapping-math` per default, at least for the level of optimization we
have in debug mode. clang however is more aggressive and assumes that it
can optimize code disregarding precise floating-point exception
semantics.

We thus set `-ffp-exceptions-behavior=strict` in debug mode to ensure
that our testsuite doesn't run into false positive floating-point
exceptions. See https://github.com/dealii/dealii/issues/15496
cmake/setup_compiler_flags_gnu.cmake

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.