]> https://gitweb.dealii.org/ - dealii.git/commit
CMake: enable -ffp-exceptions-behavior=strict when compiling with clang 15509/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:43 +0000 (15:54 -0500)
commit62d07d6a5019d6a9bc0423b15649f3c782ec4f0e
tree3e809eb8be88074fb2f0deb5ce5dfbf8112caba2
parent8d68b3192ed1c8b928dfce03ca1d615201859904
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.