BOUT-dev
BOUT-dev copied to clipboard
Lots of warnings from fmt with gcc 13
GCC 13 generates lots of warnings from libfmt: warning: possibly dangling reference to a temporary [-Wdangling-reference]
. This isn't anything we can directly fix ourselves.
In CMake 3.25, however, there is a SYSTEM
argument to add_subdirectory
that should silence these warnings.
We could add this without requiring CMake >= 3.25, because the second argument to add_subdirectory
is binary_dir
, meaning that:
add_subdirectory(externalpackages/fmt SYSTEM)
will put the fmt built files (mostly just CMake stuff) in <build dir>/SYSTEM
.
Is this too weird? Options are:
- add
SYSTEM
and require CMake >= 3.25 - add
SYSTEM
only - do nothing and hope either gcc/fmt fix the issue
Remove fmt from the subdirectory and instead switch to an installer for BOUT++, that installs fmt for us.
Using an installed fmt, there are no warnings ...