[CMake] --enable-* with cmake

Eric Noulard eric.noulard at gmail.com
Wed Aug 8 02:50:50 EDT 2007


2007/8/8, gga <ggarra at advancedsl.com.ar>:
> I'm currently using cmake for a variety of projects.  Love it.
> However, one feature I find myself missing more and more is one from
> autotools configure scripts: AC_ARG_ENABLE().
> That is, the ability to allow the configuration script (ie. cmake) to be
> run with arbitrary flags to turn on or turn off some options
> (--enable-X11 for example), regardless of what it finds on the standard
> paths.  Also this option in autoconf allows too have those options
> available to the user thru a simple help line.
>
> I know I can pass -D symbols to cmake to modify its behavior and that

What do you think very different between

configure --enable-X11
cmake -DENABLE_X11

> windows also has its ugly CmakeSetup gui.

un*x version of cmake has menu driven UI too
did you try ccmake (note the double 'c')

<joke>
personnally I think the ugliness of GUI app most
of time comes from the GUI concept itself :=))
command line is far more powerful.
</joke>

>
> However, neither approach seems to me as clean as what's available under
> autotools.

I personnally think the OPTION CMake macro is just as good
as AC_ARG_ENABLE is.


> I'm wondering if I have missed something obvious or is there
> some other approach to achieve the same functionality as autotools.

May you precise what functionality you miss, from autotools?
(Besides the fact that you have to replace --enable-xxxx with -Dxxxx)


-- 
Erk


More information about the CMake mailing list