DPDK patches and discussions
 help / color / mirror / Atom feed
From: ohilyard@iol.unh.edu
To: dev@dpdk.org
Cc: Honnappa.Nagarahalli@arm.com, thomas@monjalon.net,
	Owen Hilyard <ohilyard@iol.unh.edu>
Subject: [PATCH v1 1/4] app/test-pmd-api: Add C++ Compiler
Date: Thu,  7 Apr 2022 17:47:05 -0400	[thread overview]
Message-ID: <20220407214707.29730-2-ohilyard@iol.unh.edu> (raw)
In-Reply-To: <20220407214707.29730-1-ohilyard@iol.unh.edu>

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(+)

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


  reply	other threads:[~2022-04-07 21:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 21:47 [PATCH v1 0/4] [RFC] Testpmd RPC API ohilyard
2022-04-07 21:47 ` ohilyard [this message]
2023-10-02 18:33   ` [PATCH v1 1/4] app/test-pmd-api: Add C++ Compiler Stephen Hemminger
2022-04-07 21:47 ` [PATCH v1 2/4] app/test-pmd-api: Add POC with gRPC deps ohilyard
2022-04-07 21:47 ` [PATCH v1 3/4] app/test-pmd-api: Add protobuf file ohilyard
2022-04-07 21:47 ` [PATCH v1 4/4] app/test-pmd-api: Implementation files for the API ohilyard
2022-04-11 14:27 ` [PATCH v1 0/4] [RFC] Testpmd RPC API Jerin Jacob
2022-04-11 17:48   ` Owen Hilyard
2022-04-12  6:07     ` Jerin Jacob
2022-04-13 12:47       ` Owen Hilyard
2022-04-14 12:07         ` Ananyev, Konstantin
2022-04-14 20:09           ` Owen Hilyard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220407214707.29730-2-ohilyard@iol.unh.edu \
    --to=ohilyard@iol.unh.edu \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).