[cmake-developers] Introducing: message(DEBUG)
Richard Wackerbarth
richard at NFSNet.org
Sat Mar 3 09:27:05 EST 2012
I that you are missing the fundamental usage case.
I would like to set up all of my CMake* files to enable the selection of various verbosity levels.
Then, by specifying particular command line options, I can vary the verbosity without changing any of the files.
Editing any of the files at build time is undesirable.
On Mar 3, 2012, at 8:05 AM, Rolf Eike Beer wrote:
> Am Samstag, 3. März 2012, 17:05:11 schrieb Yury G. Kudryashov:
>> Rolf Eike Beer wrote:
>>> I have a small patch to CMake that looks like this:
>>> + if (!this->Makefile->IsOn("CMAKE_DEBUG_MESSAGES"))
>>
>> I propose to print message if one of the following holds:
>> * CMAKE_DEBUG_MESSAGES is true;
>> * CMAKE_DEBUG_MESSAGES_FileName is true, where FileName is
>> CMAKE_CURRENT_LIST_FILE's name without extension;
>> * Current list file is CMakeLists.txt and
>> CMAKE_DEBUG_MESSAGES_CurrentDirectory is true.
>>
>> This will allow
>>
>> # Turn all debug messages
>> -DCMAKE_DEBUG_MESSAGES=ON
>> # Turn all debug messages in FindBoost.cmake
>> -DCMAKE_DEBUG_MESSAGES_FindBoost=ON
>> # Turn all debug messages in mysubdir/CMakeLists.txt
>> -DCMAKE_DEBUG_MESSAGES_mysubdir=ON
>> # Turn all debug messages in **/CMakeLists.txt
>> -DCMAKE_DEBUG_MESSAGES_CMakeLists=ON
>
> I'm not absolutely sure if this is worth the effort. Not that it is generally a
> bad idea, but it will likely require some code. The way you simply could do
> this stuff is to just put "set(CMAKE_DEBUG_MESSAGES On)" at the beginning of
> the subdir/module you want to debug and reset it at the end.
>
> Eike--
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
More information about the cmake-developers
mailing list