acados / acados

Fast and embedded solvers for nonlinear optimal control
Other
816 stars 247 forks source link

Make acados dependencies more modular #1195

Open tmmsartor opened 2 months ago

tmmsartor commented 2 months ago

Not sure if mentioned before but it would be maybe good to add some optional modularity to acados core dependencies,i.e. having the possibility to use a library already installed in the system, in place of add_subdirectory in CMake.

In the case of highly system-depend libraries like BLASFEO, the user (or package-distributor) should compile and/or install the best version for the given system, but this seems reasonable assumption when opting for this hypothetical custom option.

Here is an example another project doing so and how it can look like.

Among the benefits on top of my mind there would be the easier packing, possibly smaller resources consumption, possibly cleaner maintenance. Not sure if there are any drawbacks.

Maybe related to #983, also mentioned in #1125

FreyJo commented 2 months ago

I agree that the possibility of a more modular installation is a nice option. I don't see a particular issue with BLASFEO though, as the automatic target selection works quite well. I think it is important to have submodules or some other way to pin the specific versions of (optional) dependencies.

Most users that install acados do not have the required dependencies available, so an automatic way to install them has to be provided in any case, which as an additional option does not make maintenance easier IMO.

That being said, PRs in the direction of optionally using some system wide installation of dependencies are welcome.