filter/pytorch,caffe2: they have redundant decls.
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 17 Mar 2022 03:26:12 +0000 (12:26 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 17 Mar 2022 06:15:15 +0000 (15:15 +0900)
Add -Wredundant-decl only when !(pytorch or caffe2), not !(pytorch and caffe2).
Even when only one of the two are included, they have redundant decl warnings.
It appears that we haven't tested cases where only one of pytorch and caffe2 is
enabled.

Fixes #3693

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
meson.build

index b6daff9..b9f7cdf 100644 (file)
@@ -456,7 +456,7 @@ foreach name, value: project_args
 endforeach
 
 # Add redundant declaration flag when caffe2 and pytorch both are disabled
-if not (pytorch_support_is_available and caffe2_support_is_available)
+if not (pytorch_support_is_available or caffe2_support_is_available)
   redundant_decls_flag = '-Wredundant-decls'
   if cc.has_argument (redundant_decls_flag)
     add_project_arguments([redundant_decls_flag], language: 'c')