[cmake-developers] Add command line options for deprecation message control
Michael Scott
michael.scott250 at gmail.com
Thu Sep 24 17:45:53 EDT 2015
I've created a fix for the issue of -Wno-dev and -Wno-deprecated options
not being honoured, and extended the tests to cover this additional
scenario.
However I'm having an issue with determining if variables are set in
cmake.cxx. The initial fix checked for the variables using the
"GetCacheEntryValue" method in cmState, but I found that this didn't
work when the variable (say CMAKE_WARN_DEPRECATED) was set in a .cmake
file, as is the case for the "RunCMake/message/warnmessage.cmake". I
toyed around with trying to get a hold of a cmMakefile instance and
check the state of the variable via that, by getting the first object of
the global generator makefiles, but this didn't always seem to work.
Would you be able to advise on what the correct way is to get the
current value of a variable, in the cmake class? I feel like I'm missing
something simple here, as I'm still not too familiar with the code.
Cheers,
Michael
More information about the cmake-developers
mailing list