Skip to content

Use C++ package managers instead of build scripts #140

@Risto97

Description

@Risto97

Currently, we have custom CMake functions for building libraries and tools: https://github.com/HEP-SoC/SoCMake/tree/master/cmake/build_scripts

This can work quite well, but it's inefficient for us to support this.
Since there are already projects that deal with this issue, we should consider just using those.

Here is a list of C++ package managers that I tried:

  1. Hunter
  • Implemented on CMake
  • Integrates into CMake project
  • Looks similar to current build_scripts

To add package, simply call in the CMake project

hunter_add_package(ZLIB)

More examples here https://github.com/cpp-pm/gate

  1. vcpkg
  • Implemented in CMake
  • Developed by Microsoft
  • Can be used in CLI mode or in manifest mode, where it requires separate manifest json file
  • Only manifest mode can do versioning of packages
  • The CMake build scripts are unaware of vcpkg, need to pass -DCMAKE_TOOLCHAIN_FILE when configuring
  1. conan
  • Implemented in Python, which makes it a bit tricky to use
  • Has a conan center repository of packages https://conan.io/center
  • In theory already has Verilator and SystemC packages, but they seem outdated.
  • Should have good CMake integration

#139
@benoitdenkinger

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions