2

I would like to use Ipopt in a CMake-based project using ExternalProject. The library should be installed locally and automatically in the build folder so that the user must not go through any hassle.

I can do this for simple enough repositories that do not have many dependencies; unfortunately, this is not the case for Ipopt, whose installation requires a set of packages to be installed first.

How can install and use Ipopt in a local, self-contained way using CMake ExternalProject? If this cannot be done, is there an approach that would make the process at least partially self-contained? I would be very grateful for any answer with a working CMake script!

fdev
  • 127
  • 12
  • I cannot come up with a better solution than using `FetchContent` and writing the build script from scratch. `libLapack` and `libMetis` both use CMake, which makes integrating them easier (just calling FetchContent should be sufficient). – Julian Kirsch May 04 '22 at 11:29
  • If you provide a complete working example, I will be happy to award you the bounty reward! – fdev May 04 '22 at 19:11
  • 1
    @fdev I have an almost complete CMake project. The question is, which solver do you want to use? – Felix Crazzolara May 06 '22 at 10:01
  • @FelixCrazzolara the bounty expires in 4 hours, if you provide your example by then I will happily award you! – fdev May 08 '22 at 03:01
  • @FelixCrazzolara did you manage to create a working example? – fdev Jun 02 '22 at 13:06
  • 1
    @fdev Sorry for not replying. I finished my Master thesis a month ago and had to break. I'm restarting working on the CMake project again for some of my own projects. What compiler/linear solver do you want to use for your projects? – Felix Crazzolara Jun 18 '22 at 14:48
  • Thank you very much, and good luck for your thesis. The PARDISO solver could be sufficient, but it would be even better if you could switch to different solvers with an option -- if it does not require too much effort! – fdev Jun 20 '22 at 07:46

0 Answers0