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

CMake improvements #361

Open
vagetablechicken opened this issue Jul 25, 2019 · 3 comments
Open

CMake improvements #361

vagetablechicken opened this issue Jul 25, 2019 · 3 comments

Comments

@vagetablechicken
Copy link
Contributor

vagetablechicken commented Jul 25, 2019

需要改进的几点:

  • DSN_IN_CORE等不需要的逻辑可以去掉了
  • boost库在每次dsn_add_project都会find一次,无意义的重复
  • build problem when using toolchain #86 需要去掉link_directories(),因此需要改变三方库的搜索方法,并使用export()生成rdsn的package
  • idl: replace bin/Linux/thrift with official thrift compiler XiaoMi/rdsn#190 ,整理第三方的时候可以顺便处理了
  • 在rdsn作为package的基础上,可以清理下DSN_ROOT相关的东西,比如,解除run.sh对环境变量的重度依赖,不再必须将rdsn库copy到pegasus目录下等等
  • 在链接库均由package管理,与cmake语法支持的基础上,CMakeList的target_link_libraries可以减少显式链接,可以让CMakeList更易读
  • CMakeList规范化,更易于上手

补充:

  • dsn_replica_server 和 dsn_meta_server 看看能不能做成静态库,项目统一用一种方式,有必要的时候再用 "BUILD_SHARED_LIBS=ON" 做动态库
@vagetablechicken
Copy link
Contributor Author

vagetablechicken commented Jul 25, 2019

  • 去掉DSN_IN_CORE等不需要的逻辑
  • boost库在每次dsn_add_project都会find一次,fix

@vagetablechicken
Copy link
Contributor Author

vagetablechicken commented Jul 27, 2019

cleanup ‘remove this’ comments in dsn.cmake

  • remove MY_RPOJ_LIB_PATH

  • remove MY_PROJ_INC_PATH-等bench重构好done

    • pegasus:
      • remove rocksdb::HistogramImpl, cause it's not exposed.-- use rocksdb::Statistics
      • remove MY_PROJ_INC_PATH
    • rdsn: done
  • idl: replace bin/Linux/thrift with official thrift compiler XiaoMi/rdsn#190 & fmt加入默认链接库 & DSN_SYSTEM_LIBS和默认链接库的命名关系 & curl build without idn

    • rdsn: cleanup crypto todo
    • pegasus cleanup

@vagetablechicken
Copy link
Contributor Author

vagetablechicken commented Aug 20, 2019

  • thirdparty的链接方式通过find来做 doing

现有问题:

  • prometheus需要curl,而curl在有idn的环境中会链接idn,在使用curl时就必须要跟上idn。

    目前pegasus写死了需要idn,但其实无idn的环境下就反而会导致ld can't find -lidn。
    通过find使链接隐式化,就不会再有这种问题了
    ps. curl使用也用不着idn, 可以--without-idn

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

No branches or pull requests

1 participant