Closed as not planned
Description
Situation:
- We have been talking about dependencies a while recently, but never came to a decision.
- It looks like we like to introduce dependencies on fmtlib and ranges-v3 and maybe intx. There also was the idea to replace json-cpp with nlohmann/json.
- Our repo contains a copy of evmc.
- For json-cpp we use the cmake
ExternalProject_Add
mechanism - We also depend on boost and optionally on Z3 and CVC4. For those we use plain standard cmake
find_package
.
Issues with ExternalProject_Add
:
- There is no way to override it and dynamically link against system json-cpp instead.
make
requires a network connection and starts downloading- The latter complicates e.g. PPA scripts.
- We can't pre-pack dependencies to our CI docker images, increasing build time.
Apart from boost, all the other dependencies except json-cpp (including nlohmann/json as potential json-cpp replacement) are header-only or nearly header-only.
When considering to add new dependencies we could:
- Reuse the
ExternalProject_Add
mechanism despite its drawbacks. - Use
git submodules
for the new dependencies (or all dependencies). - Instead of
submodules
usesubtree
s. - Switch everything to plain standard cmake
find_package
, while maintaining a betterìnstall_deps
script to locally install dependencies in the build tree. - Combine
find_package
with other mechanisms as fallback.