[Ipopt] Suggestion: 'ipopt-config' script

John Pye john.pye at anu.edu.au
Sat May 31 00:27:45 EDT 2008


Hi all

I wonder if there has been any thought of providing a 'ipopt-config' 
script as one of the outputs of the IPOPT build process?

These '*-config' scripts are fairly common for library code, and do the 
job of telling users of your library what are the necessary linking and 
preprocessor macros etc for correctly building a program that makes use 
of your library.

This would be particularly good in the case of IPOPT, which, because of 
all the different build-time options such as whether or not to use an 
external BLAS and LAPACK, and where the libraries are installed, and 
whether shared libraries or static libraries are created. It can be hard 
to know what the necessary flags for linking IPOPT are on any given system.

All of these things could be pulled together into a script that could 
allow users to link to IPOPT simply by something along the lines of

gcc hs071.c `ipopt-config --libs --cppflags`

I note that from the file Ipopt/examples/hs071_c/Makefile.in that many 
of the necessary text strings for writing such an ipopt-config script 
are already available in the build system, and would just need to be put 
into a shell script.

Some other projects I've seen that also use this technique include 
cppunit, python, ginac and the GTK+ 'pkg-config' system.

Cheers
JP



More information about the Ipopt mailing list