Rather than having the DPDK configuration error out when linking apps
and examples when "both" is select for "default_library" option, we can
detect that setting earlier in the build config and provide a suitable
error message to the user.
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
add_project_link_arguments('-Wno-lto-type-mismatch', language: 'c')
endif
endif
+
+if get_option('default_library') == 'both'
+ error( '''
+ Unsupported value "both" for "default_library" option.
+
+ NOTE: DPDK always builds both shared and static libraries. Please set
+ "default_library" to either "static" or "shared" to select default linkage
+ for apps and any examples.''')
+endif