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

fix build with new protobuf target for pnnx #5034

Merged
merged 3 commits into from
Sep 17, 2023

Conversation

HuPengsheet
Copy link
Contributor

nihui,您好!
1.我发现您没有修改相关的PNNX的Cmake,以支持最新的protobuf,我参考#4955对CMakeLists文件进行了修改。
2.我把find_package(protobuf)相关的代码从src/CMakeLists.txt下移动到pnnx目录下的CMakeLists.txt,这点主要是因为find_package(Torch REQUIRED)加载TorchConfig.cmake,这个cmake里定义了protobuf的相关目标,所以必须放在find_package(Torch REQUIRED)它前面,不然会有目标重复定义的错误。

tools/pnnx/src/CMakeLists.txt Outdated Show resolved Hide resolved
@nihui nihui merged commit 6eb9944 into Tencent:master Sep 17, 2023
7 checks passed
@nihui
Copy link
Member

nihui commented Sep 17, 2023

Thanks for your contribution !

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

Successfully merging this pull request may close these issues.

2 participants