[v1,1/4] app/test-pmd-api: Add C++ Compiler
Checks
Commit Message
From: Owen Hilyard <ohilyard@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 <ohilyard@iol.unh.edu>
---
meson.build | 3 +++
meson_options.txt | 2 ++
2 files changed, 5 insertions(+)
Comments
On Thu, 7 Apr 2022 17:47:05 -0400
ohilyard@iol.unh.edu wrote:
> From: Owen Hilyard <ohilyard@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 <ohilyard@iol.unh.edu>
This patch has a problem.
What ever editor you used failed to add a end of line (newline)
on the last line of the file. Git accepts this but complains, other tools
do not handle it well.
Pleas rebase and fix the series.
@@ -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()
@@ -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