[CMake] A configure script solution

Corrin Meyer cjmeyer at gmail.com
Tue Jun 24 12:46:55 EDT 2008


On Tue, Jun 24, 2008 at 12:27 PM, J <j at intuitivecreations.com> wrote:
> Greetings all!
>
> I've been sold on cmake. From what I gather, it's hands down better than
> automake and family. However, I do have a problem with not having a
> configure script.
>
> A couple of the main benefits of having a configure script are letting
> the user/package maintainer choose portions of a project to compile or
> exclude from compilation, as well as choosing alternate locations for
> libraries/includes/installations, both of which are rather important.

Have you looked at 'ccmake'?  I felt the same way initially; I didn't
want to pass all those '-D' parameters to cmake.  However, it really
isn't that different (-Dlibdir="your/path/to/lib" or
--libdir="your/path/to/lib").  The nice benefit of using 'ccmake' is
that you can see all the options, set the ones you want, and get help
comments on each option.

> Without a configure script all package maintainers for red hat/fedora,
> debian/ubuntu, etc will have to learn all the ins and outs of cmake and
> spend oodles of time setting variables and passing -D switches to cmake.

Not really sure were this would require 'oodles' of time.  Granted, I
am no expert, but you only need to set variables were you want to
override the default ones, just like using a 'configure' script
(--prefix='path' becomes -Dprefix='path').  Do you have a particular
example in mind that would not be a straight forward change?

~cjmeyer


More information about the CMake mailing list