Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

build(deps): use cmake ExternalProject to manage dependencies #438

Merged
merged 19 commits into from
Jul 28, 2020

Conversation

neverchanje
Copy link
Contributor

@neverchanje neverchanje commented Apr 13, 2020

We used to manage dependencies using thirdparty/download-thirdparty.sh and thirdparty/build-thirdparty.sh. They need heavy human script work to add a dep.

CMake ExternalProject is currently the rule of thumb approach to dependency management in C++. Another approach like Bazel and Meson require much effort to refactor our building process, so they are not in our options.

conan, vcpkg are good tools, but their aims are to manage binary of the dependencies. The binaries are limited to the platform they're built. So they have no advantages compared to CMake in terms of managing the building process of 3rdparties.

Apart from refactoring with CMake ExternalProject, I also include boost libraries (system/filesystem/regex) as a dep. I use boost -1.69 (which is not the latest but I think is more stable). So we never have to build with

./run.sh build -b $BOOST_DIR 

anymore.

Testing:

This PR is tested on:

  1. Ubuntu bionic 18.04
  2. Centos 7

@neverchanje neverchanje marked this pull request as draft May 26, 2020 07:07
@neverchanje neverchanje marked this pull request as ready for review July 23, 2020 08:46
@acelyc111 acelyc111 merged commit aef76b1 into XiaoMi:master Jul 28, 2020
@neverchanje neverchanje deleted the 3rdparty branch July 28, 2020 08:15
@hycdong hycdong added the area/installation PR or issues related to compilation / build scripts / installation / deployment. label Aug 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2.2.0 area/installation PR or issues related to compilation / build scripts / installation / deployment.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants