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

build(cmake): fix curl link of prometheus #397

Merged
merged 2 commits into from
Sep 24, 2019

Conversation

vagetablechicken
Copy link
Contributor

What problem does this PR solve?

使用find_package导入prometheus后, 由于prometheus-cpp的export写的不够灵活, INTERFACE_LINK_LIBRARIES中的curl库是绝对地址.
这就导致travis的build出现问题, 因为travis中thirdparty是prebuild的, 所以curl路径写死了为: /home/travis/build/XiaoMi/pegasus/rdsn/thirdparty/output/lib/libcurl.a.
这样的话, 我们个人的pegasus分支跑travis都会出现找不到/home/travis/build/XiaoMi/pegasus/rdsn/thirdparty/output/lib/libcurl.a的问题, 而编译失败.

What is changed and how it works?

现在提的解决方法是, 通过替换prometheus的INTERFACE_LINK_LIBRARIES为当前工程中能find到的curl库路径.

还有一个工作量大点的方案是, 将prometheus改成optional的, 不指定编译, 就不要编了. 之后也可以考虑将redis/geo等也做成optional. 更进一步地, 下载thirdparty也可以选项化.

大家看看有没有必要

Check List

Tests

  • No code

@neverchanje
Copy link
Contributor

可选编译这个可以后续做。现在我们的 clientlib 还需要编译链接 aio,修复这个更有价值

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.

None yet

3 participants