[build] Enable clang with some deps
authorYongjoo Ahn <yongjoo1.ahn@samsung.com>
Wed, 22 Nov 2023 06:36:40 +0000 (15:36 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Fri, 24 Nov 2023 04:12:38 +0000 (13:12 +0900)
- Fix compile error with clang

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
gst/nnstreamer/ml_agent.c
tests/nnstreamer_filter_extensions_common/meson.build
tools/development/parser/meson.build

index 9e92d83..6e150b4 100644 (file)
@@ -78,7 +78,7 @@ mlagent_parse_uri_string (const GValue * val)
       /** Convert the given URI for a model to the file path */
       g_autofree gchar *name = g_strdup (parts[MODEL_PART_IDX_NAME]);
       guint version = strtoul (parts[MODEL_PART_IDX_VERSION], NULL, 10);
-      g_auto (GStrv) stringfied_json;
+      g_auto (GStrv) stringfied_json = NULL;
       GError *err;
       gint rcode;
 
index 4041b44..27a5ddd 100644 (file)
@@ -33,7 +33,11 @@ if nnfw_runtime_support_is_available
 endif
 
 if pytorch_support_is_available
-  extensions += [['pytorch', 'torch', nnstreamer_filter_torch_deps, 'pytorch_lenet5.pt', 'pytorch']]
+  if cxx.get_id() == 'gcc'
+    extensions += [['pytorch', 'torch', nnstreamer_filter_torch_deps, 'pytorch_lenet5.pt', 'pytorch']]
+  else # Compilers is not gcc
+    warning('There are a few headers (Array.h and reverse_iterator.h) that require gcc for license issues. Disabling pytorch subplugin build')
+  endif
 endif
 
 if caffe2_support_is_available
index dbbe537..3272ad2 100644 (file)
@@ -63,7 +63,8 @@ toplevel_srcs = [
 ]
 toplevel_deps = [
   glib_dep,
-  gobject_dep
+  gobject_dep,
+  declare_dependency(compile_args : '-Wno-unused-but-set-variable')
 ]
 toplevel = executable('nnstreamer-parser', toplevel_srcs,
   dependencies: toplevel_deps,