entity-manager: runtime schema validation

Uncomment the schema validation code and create a meson option to enable
this code path. The option is by default false, so the default codepath
is untouched.

Tested: Not tested, since the schemas can be validated at build time.
Whoever wants to experiment with this code, feel free to test it.
At least now it is as easy as enabling a meson option.

Change-Id: Icc2226e2e08ede5cff5a5f97bc29c8e38b117ff8
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/src/entity_manager/meson.build b/src/entity_manager/meson.build
index 622cf53..0fe71dd 100644
--- a/src/entity_manager/meson.build
+++ b/src/entity_manager/meson.build
@@ -1,3 +1,11 @@
+cpp_args_em = cpp_args + ['-DBOOST_ASIO_DISABLE_THREADS']
+
+if get_option('runtime-validate-json')
+    cpp_args_em += ['-DENABLE_RUNTIME_VALIDATE_JSON=true']
+else
+    cpp_args_em += ['-DENABLE_RUNTIME_VALIDATE_JSON=false']
+endif
+
 executable(
     'entity-manager',
     'entity_manager.cpp',
@@ -10,7 +18,7 @@
     'topology.cpp',
     'utils.cpp',
     '../utils.cpp',
-    cpp_args: cpp_args + ['-DBOOST_ASIO_DISABLE_THREADS'],
+    cpp_args: cpp_args_em,
     dependencies: [
         boost,
         nlohmann_json_dep,