[CMake] Possible 'brief' output options for UnixMakefileGenerator

Campbell Barton ideasman42 at gmail.com
Tue Dec 21 08:26:50 EST 2010


The problem with with RULE_MESSAGES is that it is too close to "make >
/dev/null".
If a file is built there is no info about this.

The main issue for me is partial rebuilds flood the console.

eg, for blender, a build with no changes prints 83 lines like this...
[  1%] Built target bf_editor_animation
[  2%] Built target bf_editor_armature
[  2%] Built target bf_editor_curve
[  5%] Built target bf_editor_datafiles
...

If one file changes, it prints 87 lines.

So perhaps this could be solved by having "Built target" messages
print, only if one of the C/C++ files was rebuilt, or lib linked.

Would this be acceptable? (as default or an option)

On Tue, Dec 21, 2010 at 12:13 PM, David Cole <david.cole at kitware.com> wrote:
> One more alternative worth considering here that is cross-platform and
> doesn't require a wrapper script. (Not sure if it quiets things down enough
> for you or not, but the latest change to this feature will quiet things a
> little bit more starting with the upcoming CMake 2.8.4.)
>
> See the RULE_MESSAGES global property:
> http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_global:RULE_MESSAGES
>
> And bugs related to it (all of which are closed at this point):
> http://public.kitware.com/Bug/view.php?id=5323
> http://public.kitware.com/Bug/view.php?id=7062
> http://public.kitware.com/Bug/view.php?id=8726
> http://public.kitware.com/Bug/view.php?id=11304
>
>
> HTH,
> David
>
>
> On Mon, Dec 20, 2010 at 11:59 PM, Campbell Barton <ideasman42 at gmail.com>
> wrote:
>>
>> Slightly improved version which treats "Linking" lines separately from
>> source lines.
>> and its not messed up by threaded builds.
>>
>> ---
>> #!/bin/bash
>> # filters CMake output to be more like nan-makefiles
>>
>> FILTER="^\[ *[0-9]*%] \|^Built target "
>> make $@ | \
>>                sed -u -e 's/^Linking .*\//Linking /' | \
>>                sed -u -e 's/^.*\//  /' | \
>>                grep --line-buffered -v "$FILTER"
>>
>> echo "Build Done"
>> ---
>>
>> Output looks like this...
>>
>> Linking libbf_intern_audaspace.a
>>  sp_ienv.c.o
>>  binreloc.c.o
>>  sp_preorder.c.o
>>  spanel_bmod.c.o
>>  glew.c.o
>>  MT_ExpMap.cpp.o
>> Linking libextern_binreloc.a
>>  spanel_dfs.c.o
>>  spivotL.c.o
>> Linking libge_videotex.a
>>
>>
>>
>> On Tue, Dec 21, 2010 at 3:04 AM, j s <j.s4403 at gmail.com> wrote:
>> > Cool,
>> >
>> > You might want to put a '^' after each \|, if that is how grep regex
>> > handles
>> > it.  I've tended toward egrep which is more perl like when doing more
>> > complicated expressions.  Color is probably lost since it is no longer a
>> > tty.
>> >
>> > Juan
>> >
>> > On Mon, Dec 20, 2010 at 3:56 PM, Campbell Barton <ideasman42 at gmail.com>
>> > wrote:
>> >>
>> >> @Michael Wild. good point about threaded builds, so I take back the
>> >> bit about "Entering directory, then filenames only", nevertheless.
>> >> some way to reduce flooding the console when rebuilding a single file
>> >> would be much appreciated.
>> >>
>> >> @Juan, from your suggestion, I now use this.
>> >>
>> >> ---
>> >> #!/bin/bash
>> >> # filters CMake output to be more like nan-makefiles
>> >>
>> >> FILTER="^Scanning \|Linking \(C\|CXX\) static library \|Built target "
>> >> make $@ | grep --line-buffered -v "$FILTER" | sed  -e 's/^.*\//  /'
>> >> echo "Build Done"
>> >> ---
>> >>
>> >> Jesper Eskilson, agree supporting make -s would be good to have.
>> >>
>> >> On Mon, Dec 20, 2010 at 10:05 AM, Jesper Eskilson
>> >> <jesper.eskilson at iar.com> wrote:
>> >> > On 12/20/2010 01:01 AM, Campbell Barton wrote:
>> >> >>
>> >> >> Hi, I'm STILL trying to have CMake makefiles replace Blender's hand
>> >> >> crafted makefiles.
>> >> >>
>> >> >> Now the main sticking point with 2 other developers is they don't
>> >> >> like
>> >> >> CMakes output, as its overly verbose.
>> >> >>
>> >> >> I realize CMake doesn't need to bend to the whim of all users but
>> >> >> wondering if we could have something like  RULE_BRIEF_OUTPUT
>> >> >>
>> >> >> Rather then printing progress and full path for all files it could
>> >> >> skip percentage and use a relative path for each C file.
>> >> >>
>> >> >> I can try submitting a patch but would first like to know if this
>> >> >> would be acceptable.
>> >> >
>> >> > I've submitted a bugreport about this:
>> >> > http://www.cmake.org/Bug/view.php?id=7062. It was submitted almost
>> >> > two
>> >> > years
>> >> > ago, so I'm not sure it is getting very much attention by the CMake
>> >> > people.
>> >> >
>> >> > --
>> >> > Jesper Eskilson
>> >> > Developer
>> >> > IAR Systems
>> >> >
>> >> > _______________________________________________
>> >> > 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://www.cmake.org/mailman/listinfo/cmake
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> - Campbell
>> >> _______________________________________________
>> >> 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://www.cmake.org/mailman/listinfo/cmake
>> >
>> >
>>
>>
>>
>> --
>> - Campbell
>> _______________________________________________
>> 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://www.cmake.org/mailman/listinfo/cmake
>
>



-- 
- Campbell


More information about the CMake mailing list