[cmake-developers] splitting the man page ?
Brad King
brad.king at kitware.com
Mon Aug 28 10:24:34 EDT 2006
Alexander Neundorf wrote:
> I had a look at the code, and found that there is already a
> cmCommand::IsDeprecated(int major, int minor); which currently for all
> commands returns false.
> If I would now make it return true for the deprecated commands, I would be
> able to use this to generated the documentation of all/only the
> deprecated/only the not deprecated commands.
> The problem here is that if I would do this, then cmake would report an error
> (in cmMakefile::ExecuteCommand() ) everytime a deprecated command is used, so
> many cmake scripts out there would break.
>
> So what do you suggest ?
> Add another function IsObsolete() to cmCommand and use this only for the
> docs ?
> Make IsDeprecated return true for the appropriate commands but don't let
> cmMakefile::ExecuteCommand() generate an error for this case ?
Don't hard-code the return value of IsDeprecated. Instead we should
check the value of CMAKE_BACKWARDS_COMPATIBILITY and return true from
IsDeprecated if the value is set high enough. However we don't want to
parse this variable every time a command is invoked, so we may want to
make sure there is a fast way to get this value from cmMakefile too.
-Brad
More information about the cmake-developers
mailing list