如何与柯南一起正确使用Cmake子标题?
假设我们有:
app
cmake Project,该项目使用柯南来管理依赖项(通过conanfile.txt
)lib
lib cmake库库独立项目出于相同的目的,生活在单独的存储库中lib
是app
app
和lib
依赖项的子标记。 在这种
情况下错误:
[cmake] CMake Error at build/conanbuildinfo.cmake:1507 (add_library):
[cmake] add_library cannot create imported target "CONAN_LIB::boost_boost_contract"
[cmake] because another target with the same name already exists.
处理此类案件的正确方法是什么?当我们嵌套了Cmake子标记以及父和嵌套的项目时,请使用柯南。
Let's say we have:
App
CMake project which uses Conan to manage dependencies (viaconanfile.txt
)Lib
CMake library standalone project which also uses Conan for same purpose, lives in a separate repositoryLib
is a subproject ofApp
- Some of
App
andLib
dependencies in their ownconanfile.txt
files are same (let's say they both useboost/1.78.0
)
In this case, App
project fails to build with error:
[cmake] CMake Error at build/conanbuildinfo.cmake:1507 (add_library):
[cmake] add_library cannot create imported target "CONAN_LIB::boost_boost_contract"
[cmake] because another target with the same name already exists.
What's the proper way to handle such cases? When we have nested CMake subproject and both parent and nested project use Conan inside.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论