When running cmake on a project which has add_jar() in it, a message unconditionally appears during the jar building:
-- Clean class files from previous build
This message comes from this file (in my installation):
/usr/local/share/cmake-3.19/Modules/UseJava/ClearClassFiles.cmake
That message line looks like this:
message(STATUS "Clean class files from previous build")
The message appears during the build (ninja) regardless of what “–log-level” I set when running cmake. The file is called from
Modules/UseJava.cmake
using ${CAMKE_COMMAND} … -P … ClearClassFiles.cmake.
Setting the CMAKE_MESSAGE_LOG_LEVEL variable also has no effect on that message. As far as I’m concerned, that’s not a necessary message during my build, but I cannot make it go away. Is there a way I can make the recursive cmake call honor the --log-level I’ve specified?
Thanks