From: Owen Hilyard <ohily...@iol.unh.edu> Adds a C++ compiler to the project, which is currently enabled by default for ease of testing. Meson currently lacks a way to try to get a compiler, and failing to find a compiler for a language always causes a hard error, so this is the only workable approach.
Signed-off-by: Owen Hilyard <ohily...@iol.unh.edu> --- meson.build | 3 +++ meson_options.txt | 2 ++ 2 files changed, 5 insertions(+) diff --git a/meson.build b/meson.build index 937f6110c0..01d47100f2 100644 --- a/meson.build +++ b/meson.build @@ -31,6 +31,9 @@ endif # set up some global vars for compiler, platform, configuration, etc. cc = meson.get_compiler('c') +if get_option('use_cpp') + cxx = meson.get_compiler('cpp') +endif dpdk_source_root = meson.current_source_dir() dpdk_build_root = meson.current_build_dir() dpdk_conf = configuration_data() diff --git a/meson_options.txt b/meson_options.txt index 7c220ad68d..9461d194a1 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -48,3 +48,5 @@ option('tests', type: 'boolean', value: true, description: 'build unit tests') option('use_hpet', type: 'boolean', value: false, description: 'use HPET timer in EAL') +option('use_cpp', type: 'boolean', value: true, description: + 'enable components requiring a C++ compiler.') \ No newline at end of file -- 2.30.2