[CMake] New warnings in CMake 2.8.4-rc2

Micha Renner Micha.Renner at t-online.de
Wed Feb 2 10:06:47 EST 2011


Am Mittwoch, den 02.02.2011, 09:49 -0500 schrieb Brad King:
> On 2/2/2011 9:21 AM, Michael Jackson wrote:
> > On Feb 2, 2011, at 9:08 AM, Brad King wrote:
> >> 
> >> cmake --help:
> >> 
> >>  --warn-uninitialized        = Warn about uninitialized values.
> >>  --warn-unused-vars          = Warn about unused variables.
> >>  --no-warn-unused-cli        = Don't warn about command line options.
> > 
> > So does the -warn-uninitialized ENABLE or DISABLE the new warnings?
> 
> It does what the documentation says (enable).  Bill's answer
> was incorrect unless he was referring to something else.  There
> are three cases:
> 
> - User passes -DCMAKE_BIULD_TYPE on the command line and gets a warning
> because it is misspelled and therefore unused.  This is ON by default
> but can be disabled with --no-warn-unused-cli, or by *gasp* not passing
> unused variables.
> 
> - Project does ${UNINITIALIZED_VAR} and nothing happens, but it can
> be a warning if --warn-uninitialized is passed.  This is intended to
> help cleanup project source code.
> 
> - Project does set(VAR_THAT_IS_NOT_USED 1) and nothing happens, but
> can be a warning if --warn-unused-vars is passed.
Yes, this is my solution, but is it in this form documented?

Micha




More information about the CMake mailing list