protocolbuffers / protocolbuffers/protobuf
CMake find_package requires CONFIG mode
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 72k
- Forks
- 16.3k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 140
Description
The FindProtobuf module has shipped with cmake since version 3.6, but it is no longer compatible with our cmake setup.
If you use module mode of find_package by typing something like:
find_package(Protobuf)
You will end up with a bad configuration and a broken build. To get this to work you must use config mode like:
find_package(Protobuf CONFIG)
which will use the cmake configs we ship with our package.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked FindProtobuf documentation and reproduce the failure using find_package(Protobuf) versus find_package(Protobuf CONFIG). Then inspect the CMake configs shipped by the package and establish a configuration path that avoids the bad configuration and broken build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100