Replace Argument class with CLI11
CLI11 is one of the most commonly use argument parser in OpenBMC.
The Argument class will be replaced with CLI11 and the
argument.(h/c)pp file will be removed.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ibff60a19d3ff9209ca70889acc9e6aec4a8d4fca
diff --git a/meson.build b/meson.build
index 0ae8584..2d4dd91 100644
--- a/meson.build
+++ b/meson.build
@@ -13,7 +13,16 @@
sdbusplus_dep = dependency('sdbusplus')
phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
boost = dependency('boost', include_type: 'system')
+
+cxx = meson.get_compiler('cpp')
+if cxx.has_header('CLI/CLI.hpp')
+ cli11_dep = declare_dependency()
+else
+ cli11_dep = dependency('CLI11')
+endif
+
deps = [
+ cli11_dep,
sdbusplus_dep,
phosphor_dbus_interfaces_dep,
boost,
@@ -28,7 +37,6 @@
)
sources = [
- 'argument.cpp',
'controller.cpp',
'physical.cpp',
'sysfs.cpp',