From e3285fee100458e7d7e47e17179d8842c910d40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Izzo?= Date: Fri, 27 Nov 2020 12:49:39 +0100 Subject: [PATCH] Add platform test compilation options --- meson.build | 11 +++++++++-- meson_options.txt | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 24d12530..5c91523f 100644 --- a/meson.build +++ b/meson.build @@ -11,12 +11,19 @@ project('OpenRTX', 'c', ## OpenRTX -openrtx_src = ['openrtx/src/main.c', - 'openrtx/src/bootstrap.c', + +openrtx_src = ['openrtx/src/bootstrap.c', 'openrtx/src/state.c', 'openrtx/src/ui.c', 'openrtx/src/threads.c'] +## Replace main executable with platform test +if get_option('test') != '' + openrtx_src += 'tests/platform/'+get_option('test')+'.c' +else + openrtx_src += 'openrtx/src/main.c' +endif + openrtx_inc = ['openrtx/include/interfaces', 'openrtx/include', 'platform/drivers/ADC', diff --git a/meson_options.txt b/meson_options.txt index e99a9310..ff520d51 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1 +1,2 @@ option('asan', type : 'boolean', value : false, description : 'Compile the software with AddressSanitizer') +option('test', type: 'string', description: 'Replace the main OpenRTX source file with a specialized test')