All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] grpc: new package
Date: Tue, 27 Nov 2018 18:17:06 +0100	[thread overview]
Message-ID: <bf640496-1d99-e16b-020b-d60527a4faa1@mind.be> (raw)
In-Reply-To: <20181118211942.28839-2-robertroyrose@gmail.com>

 Regarding the CMake issue that Thomas found...

On 18/11/2018 22:19, Robert Rose wrote:
> diff --git a/package/grpc/0001-target-build-using-host-plugin.patch b/package/grpc/0001-target-build-using-host-plugin.patch
> new file mode 100644
> index 0000000000..379464916a
> --- /dev/null
> +++ b/package/grpc/0001-target-build-using-host-plugin.patch
> @@ -0,0 +1,26 @@
> +From f7e70f03167834ce5e221c7dbca936edb1662274 Mon Sep 17 00:00:00 2001
> +From: Robert Rose <robertroyrose@gmail.com>
> +Date: Sun, 18 Nov 2018 12:55:49 -0800
> +Subject: [PATCH 1/1] target build using host plugin
> +
> +Signed-off-by: Robert Rose <robertroyrose@gmail.com>
> +---
> + CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index ab1802e..1b44c3c 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -199,7 +199,7 @@ function(protobuf_generate_grpc_cpp)
> +       COMMAND ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}
> +       ARGS --grpc_out=generate_mock_code=true:${_gRPC_PROTO_GENS_DIR}
> +            --cpp_out=${_gRPC_PROTO_GENS_DIR}
> +-           --plugin=protoc-gen-grpc=$<TARGET_FILE:grpc_cpp_plugin>
> ++           --plugin=protoc-gen-grpc=$<IF:$<BOOL:${gRPC_NATIVE_CPP_PLUGIN}>,${gRPC_NATIVE_CPP_PLUGIN},$<TARGET_FILE:grpc_cpp_plugin>>

 The $<IF:...> generator was apparently introduced in CMake 3.8. So if you use
it, the patch should also update the minimal CMake version at the beginning of
the file, *and* the Buildroot minimum version should be updated from current 3.1
to 3.8 in support/dependencies/check-host-cmake.mk.

 Since that is not very nice, maybe a better alternative is to allow
grpc_cpp_plugin to be an imported target instead of an executable. That way you
can still simply use the $<TARGET_FILE> generator. Of course, importing a target
is a little bit more complicated...

 I think the latter would also be easier to accept for upstream.

> +            ${_protobuf_include_path}
> +            ${REL_FIL}
> +       DEPENDS ${ABS_FIL} ${_gRPC_PROTOBUF_PROTOC} grpc_cpp_plugin
> +-- 
> +2.19.1
> +


 BTW, there's also a 1.16.1 release out.

 Regards,
 Arnout

  parent reply	other threads:[~2018-11-27 17:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-18 21:19 [Buildroot] [PATCH v2 1/2] c-ares: support host build Robert Rose
2018-11-18 21:19 ` [Buildroot] [PATCH v2 2/2] grpc: new package Robert Rose
2018-11-24 14:12   ` Thomas Petazzoni
     [not found]     ` <CALxq1w45Krr6E8Ri7rxrDN9USkbPdLbqmmK2x-XiH3AmHHeqpg@mail.gmail.com>
2018-11-24 20:45       ` Thomas Petazzoni
2018-11-24 22:00         ` robert rose
2018-11-24 23:57           ` robert rose
2018-11-26 21:58             ` Thomas Petazzoni
2018-11-27 17:17   ` Arnout Vandecappelle [this message]
2018-11-18 21:33 ` [Buildroot] [PATCH v2 1/2] c-ares: support host build Arnout Vandecappelle
2018-11-18 21:37   ` Arnout Vandecappelle

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=bf640496-1d99-e16b-020b-d60527a4faa1@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.