[utils] add getLocaltime function
[platform/core/ml/nntrainer.git] / meson.build
index 96f6448..711165d 100644 (file)
@@ -1,5 +1,5 @@
 project('nntrainer', 'c', 'cpp',
-  version: '0.3.0',
+  version: '0.4.0',
   license: ['apache-2.0'],
   meson_version: '>=0.50.0',
   default_options: [
@@ -78,6 +78,7 @@ if get_option('platform') != 'android'
   nntrainer_includedir = nntrainer_prefix / get_option('includedir') / 'nntrainer'
   nntrainer_confdir = get_option('sysconfdir')
   application_install_dir = nntrainer_bindir / 'applications'
+  nntrainer_swapdir = '/tmp'
 else
   nntrainer_prefix = meson.build_root() / 'android_build_result'
   # @todo arch has to be option
@@ -86,6 +87,18 @@ else
   nntrainer_bindir = nntrainer_prefix / 'bin'
   nntrainer_confdir = nntrainer_prefix / 'conf'
   application_install_dir = nntrainer_prefix / 'examples'
+  nntrainer_swapdir = '/data/local/tmp'
+endif
+
+# handle swap options
+if get_option('enable-memory-swap')
+  nntrainer_enable_swap = 'true'
+else
+  nntrainer_enable_swap = 'false'
+endif
+
+if get_option('memory-swap-path') != ''
+  nntrainer_swapdir = get_option('memory-swap-path')
 endif
 
 # handle resources
@@ -107,6 +120,8 @@ nntrainer_conf.set('EXEC_PREFIX', nntrainer_bindir)
 nntrainer_conf.set('LIB_INSTALL_DIR', nntrainer_libdir)
 nntrainer_conf.set('PLUGIN_INSTALL_PREFIX', nntrainer_libdir / 'nntrainer')
 nntrainer_conf.set('INCLUDE_INSTALL_DIR', nntrainer_includedir / '..')
+nntrainer_conf.set('MEMORY_SWAP', nntrainer_enable_swap)
+nntrainer_conf.set('MEMORY_SWAP_PATH', nntrainer_swapdir)
 
 dummy_dep = dependency('', required: false)
 found_dummy_dep = declare_dependency() # dummy dep to use if found