Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CMake] Allow custom plugin options e.g. to generate mocks #9105

Merged
merged 6 commits into from
Feb 9, 2022
Merged

[CMake] Allow custom plugin options e.g. to generate mocks #9105

merged 6 commits into from
Feb 9, 2022

Conversation

tiolan
Copy link
Contributor

@tiolan tiolan commented Oct 15, 2021

This would allow setting options for plugins, e.g. to generate mocks.
Example:

protobuf_generate(
      TARGET
      myTarget
      LANGUAGE
      grpc
      PROTOC_OUT_DIR
      ${CMAKE_BINARY_DIR}
      GENERATE_EXTENSIONS
      .grpc.pb.h
      .grpc.pb.cc
      PLUGIN
      protoc-gen-grpc=$<TARGET_FILE:gRPC::grpc_cpp_plugin>
      PLUGIN_OPTIONS
      generate_mock_code=true
      IMPORT_DIRS
      ${PROTO_IMPORT_DIRS})

@google-cla
Copy link

google-cla bot commented Oct 15, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Oct 15, 2021
@tiolan
Copy link
Contributor Author

tiolan commented Oct 15, 2021

@googlebot I signed it!

@tiolan
Copy link
Contributor Author

tiolan commented Oct 15, 2021

Resolves #8779

@tiolan
Copy link
Contributor Author

tiolan commented Nov 30, 2021

@acozzette any chance this will be merged?

@acozzette acozzette merged commit 4ed3941 into protocolbuffers:master Feb 9, 2022
@acozzette
Copy link
Member

Thanks, @tiolan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants