clover: eliminate "ignoring attributes on template argument" warning
authorKarol Herbst <kherbst@redhat.com>
Fri, 20 Sep 2019 11:08:50 +0000 (13:08 +0200)
committerKarol Herbst <karolherbst@gmail.com>
Wed, 25 Sep 2019 10:39:58 +0000 (10:39 +0000)
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
src/gallium/state_trackers/clover/meson.build

index 04c6f1ea0ebe7f0c42a503d6b45973d8319c153d..6704f8567bb9d888111823e4a1298981b30ea7fc 100644 (file)
@@ -22,6 +22,13 @@ clover_cpp_args = []
 clover_spirv_cpp_args = []
 clover_incs = [inc_include, inc_src, inc_gallium, inc_gallium_aux]
 
+# the CL header files declare attributes on the CL types. Compilers warn if
+# we use them as template arguments. Disable the warning as there isn't
+# anything we can do about it
+if cpp.has_argument('-Wno-ignored-attributes')
+   clover_cpp_args += '-Wno-ignored-attributes'
+endif
+
 if with_opencl_icd
   clover_cpp_args += '-DHAVE_CLOVER_ICD'
 endif
@@ -45,7 +52,9 @@ libclllvm = static_library(
   ),
   include_directories : clover_incs,
   cpp_args : [
-    clover_spirv_cpp_args, cpp_vis_args,
+    clover_cpp_args,
+    clover_spirv_cpp_args,
+    cpp_vis_args,
     '-DLIBCLC_INCLUDEDIR="@0@/"'.format(dep_clc.get_pkgconfig_variable('includedir')),
     '-DLIBCLC_LIBEXECDIR="@0@/"'.format(dep_clc.get_pkgconfig_variable('libexecdir')),
     '-DCLANG_RESOURCE_DIR="@0@"'.format(join_paths(