diff --git a/meson.build b/meson.build index cf3aa2b496..a7e3e87744 100644 --- a/meson.build +++ b/meson.build @@ -393,7 +393,7 @@ possible_common_cc_flags = [ c_args = get_option('c_args') # Our json library does not support -ffinite-math-only, which is enabled by -Ofast or -ffast-math. -if (('-Ofast' in c_args or '-ffast-math' in c_args or '-ffinite-math-only' in c_args) and not ('-fno-finite-math-only' in c_args)) +if (('-Ofast' in c_args or '-ffast-math' in c_args or '-ffinite-math-only' in c_args) and '-fno-finite-math-only' not in c_args) error('-Ofast, -ffast-math, or -ffinite-math-only is specified in c_args.') endif