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

Add option to use external GTest in CMake #8736

Merged
merged 3 commits into from
Feb 8, 2022

Conversation

florin-crisan
Copy link
Contributor

If -Dprotobuf_USE_EXTERNAL_GTEST=ON is passed to CMake, it will use an external Google Test copy (i.e. by calling find_package(GTest REQUIRED)) rather than the one provided as a submodule.

This makes sense for larger projects that might already include Google Test and want to use a more standard CMake approach.

Also updated build instructions with this information, and more idiomatic usage.

@google-cla google-cla bot added the cla: yes label Jun 15, 2021
If `-Dprotobuf_USE_EXTERNAL_GTEST=ON` is passed to CMake, it will use an external Google Test copy (i.e. by calling `find_package(GTest REQUIRED)`) rather than the one provided as a submodule.

This makes sense for larger projects that might already include Google Test and want to use a more standard CMake approach.

Also updated build instructions with this information, and more idiomatic usage.
@acozzette acozzette merged commit 9ebb317 into protocolbuffers:master Feb 8, 2022
@acozzette
Copy link
Member

Thanks, @florin-crisan!

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.

3 participants