[CMake] Parsing cmake command line parameters
Rodolfo Schulz de Lima
rodolfo at rodsoft.org
Mon Dec 17 13:14:57 EST 2007
Alexander Neundorf escreveu:
> If you can find some spare time, there is a command argument parser in
> CMake/Source/kwsys/, which is used e.g. by cpack, but not (yet) by cmake.
> Using this in cmake is the first step in getting better support for custom
> command line parameters. A patch would be very welcome.
> Currently I don't have the time.
I think I'll have some spare time to do this on this weekend, I'd be
glad to help if there's enough coordination to avoid unnecessary work
duplication.
> Second idea: maybe it would already help if the command line arguments to
> cmake would be available via a special cmake variable.
> Is there anything which speaks against this, Bill ?
IMHO, we should differentiate between --enable/--disable and
--with/--without, like it is on autotools' configure. The former used
to enable/disable features, the other to compile with/without some
external library.
There's also the ubiquitous --prefix that should be mapped to
CMAKE_INSTALL_PREFIX, and the others that commonly appear when we
execute 'configure --help'.
It should be nice to have a framework to facilitate working with
enable/disable and with/without. The other common arguments that maps to
cmake variables should be set up by default.
Regards,
rod
More information about the CMake
mailing list