[CMake] New warnings in CMake 2.8.4-rc2

Emmanuel Blot eblot.ml at gmail.com
Thu Feb 17 16:37:30 EST 2011


> The only warning that is enabled by default is to warn you about
> misspelled -D options that you pass on the command line. (We think
> they *may* be misspelled because they are not referenced in the
> configure/generate steps... So it's just a warning.)

> You can suppress this by also passing "--no-warn-unused-cli" on the
> CMake command line. Or by avoiding passing in the unused variables in
> the first place. Or by sticking with CMake 2.8.3 that does not produce
> this warning.
>
> Those are your 3 options for avoiding this warning.

The question is HOW do you "stick with cmake 2.8.3" - or stick with cmake 2.8.4.

This is the actual issue: there's no way to "stick with" a minor
release of cmake when you distribute code, because you cannot enforce
a minor release of cmake (a regular linux distribution will upgrade
the minor version at some point, and this cannot be controlled). So at
some point somewhere, building with cmake will throw new warnings, and
there's no way to control this. As the  "--no-warn-unused-cli" option
would simply break the build with a previous minor release of CMake,
this means that the script calling CMake needs to detect the version
of cmake, and tweak the cmake command line accordingly. Dirty, at
best.



More information about the CMake mailing list