From b8412aba1020a57b3d28c081e1fc15fb844f0f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Fri, 22 Sep 2023 14:33:14 +0200 Subject: [PATCH] =?UTF-8?q?Meson:=20enable=20-Wold-style-cast=20warning=20?= =?UTF-8?q?when=20warning=5Flevel=E2=A9=BE2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meson.build b/meson.build index e8a0b5bd99..66fd73f2a7 100644 --- a/meson.build +++ b/meson.build @@ -6,8 +6,6 @@ # probably not in our current setup); the pkgconfig_define option of # dep.get_variable() is unfortunately not helpful # Close to https://github.com/mesonbuild/meson/issues/3606 -# - add -Wold-style-cast C++ flag except when building flex-generated files -# (only when warning_level ⩾ 2) # - add the possibility to customize the integration test names (with a new optional 'name' keyword in the dictionaries) # - Add an option to skip the removal of the temporary test directories, for debugging purposes # - See what to do with xvfb-run (see #1892). Maybe try to detect it from meson.build, and pass it optionally to the test driver script @@ -24,6 +22,7 @@ project('dynare', add_global_arguments('-DPACKAGE_VERSION="' + meson.project_version() + '"', language : 'cpp') if get_option('warning_level').to_int() >= 2 + add_global_arguments('-Wold-style-cast', language : 'cpp') add_global_arguments('-Wimplicit-interface', '-Wno-compare-reals', language : 'fortran') endif -- GitLab