Skip to content

Add option to use external GTest in CMake#8736

Merged
acozzette merged 3 commits intoprotocolbuffers:masterfrom
florin-crisan:external-gtest
Feb 8, 2022
Merged

Add option to use external GTest in CMake#8736
acozzette merged 3 commits intoprotocolbuffers:masterfrom
florin-crisan:external-gtest

Conversation

@florin-crisan
Copy link
Copy Markdown
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
Copy Markdown

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