Use exprtk expression parser
Using expression parser tool exprtk to calculate sensor value
from given expression from config file.
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
Change-Id: Ie765748374a2c7a82ab9689b57c63fce7b015364
diff --git a/meson.build b/meson.build
index 4258e5e..6de3ea0 100644
--- a/meson.build
+++ b/meson.build
@@ -7,6 +7,17 @@
],
)
+cpp = meson.get_compiler('cpp')
+if cpp.has_header('exprtk.hpp')
+ exprtk = declare_dependency()
+else
+ subproject('exprtk', required: false)
+ exprtk = declare_dependency(
+ include_directories: 'subprojects/exprtk'
+ )
+endif
+
+
executable(
'virtual-sensor',
[
@@ -17,6 +28,7 @@
dependency('sdbusplus'),
dependency('phosphor-dbus-interfaces'),
dependency('sdeventplus'),
+ exprtk,
],
install: true,
install_dir: get_option('bindir')