[CMake] Possible 'brief' output options for UnixMakefileGenerator

Michael Wild themiwi at gmail.com
Mon Dec 20 00:49:46 EST 2010


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.
> 
> how it looks now...
> --- snip
> Scanning dependencies of target bf_editor_animation
> [  0%] Building C object
> source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/anim_channels_defines.c.o
> [  0%] Building C object
> source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/anim_channels_edit.c.o
> [  0%] Building C object
> source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/anim_deps.c.o
> [  0%] Building C object
> source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/anim_filter.c.o
> [  0%] Building C object
> source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/anim_ipo_utils.c.o
> [  0%] Building C object
> source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/anim_markers.c.o
> [  0%] Building C object
> source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/drivers.c.o
> [  0%] Building C object
> source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/fmodifier_ui.c.o
> [  1%] Building C object
> source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/keyframes_draw.c.o
> [  1%] Building C object
> source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/keyframes_edit.c.o
> [  1%] Building C object
> source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/keyframes_general.c.o
> [  1%] Building C object
> source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/keyframing.c.o
> [  1%] Building C object
> source/blender/editors/animation/CMakeFiles/bf_editor_animation.dir/keyingsets.c.o
> Linking C static library ../../../../lib/libbf_editor_animation.a
> [  1%] Built target bf_editor_animation
> Scanning dependencies of target bf_editor_armature
> [  1%] Building C object
> source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/armature_ops.c.o
> [  1%] Building C object
> source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/editarmature.c.o
> [  1%] Building C object
> source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/editarmature_generate.c.o
> [  1%] Building C object
> source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/editarmature_retarget.c.o
> [  1%] Building C object
> source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/editarmature_sketch.c.o
> [  1%] Building C object
> source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/poseSlide.c.o
> [  2%] Building C object
> source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/poseUtils.c.o
> [  2%] Building C object
> source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/poselib.c.o
> [  2%] Building C object
> source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/poseobject.c.o
> [  2%] Building C object
> source/blender/editors/armature/CMakeFiles/bf_editor_armature.dir/reeb.c.o
> Linking C static library ../../../../lib/libbf_editor_armature.a
> [  2%] Built target bf_editor_armature
> Scanning dependencies of target bf_editor_curve
> [  2%] Building C object
> source/blender/editors/curve/CMakeFiles/bf_editor_curve.dir/curve_ops.c.o
> [  2%] Building C object
> source/blender/editors/curve/CMakeFiles/bf_editor_curve.dir/editcurve.c.o
> [  2%] Building C object
> source/blender/editors/curve/CMakeFiles/bf_editor_curve.dir/editfont.c.o
> Linking C static library ../../../../lib/libbf_editor_curve.a
> [  2%] Built target bf_editor_curve
> [  5%] Built target bf_editor_datafiles
> ---
> 
> What it could look like...
> --- snip
> Entering 'source/blender/editors/animation'
>  anim_channels_defines.c
>  anim_channels_edit.c
>  anim_deps.c
>  anim_filter.c
>  anim_ipo_utils.c
>  anim_markers.c
>  drivers.c
>  fmodifier_ui.c
>  keyframes_draw.c
>  keyframes_edit.c
>  keyframes_general.c
>  keyframing.c
>  keyingsets.c
> Linking C static library ../../../../lib/libbf_editor_animation.a
> [  1%] Built target bf_editor_animation
> Entering 'source/blender/editors/armature'
>  armature_ops.c
>  editarmature.c
>  editarmature_generate.c
>  editarmature_retarget.c
>  editarmature_sketch.c
>  poseSlide.c
>  poseUtils.c
>  poselib.c
>  poseobject.c
>  reeb.c
> Linking C static library ../../../../lib/libbf_editor_armature.a
> [  2%] Built target bf_editor_armature
> Entering 'source/blender/editors/curve'
>  curve_ops.c
>  editcurve.c
>  editfont.c
> Linking C static library ../../../../lib/libbf_editor_curve.a
> [  2%] Built target bf_editor_curve
> [  5%] Built target bf_editor_datafiles
> ---
> 

IMHO, I think the abbreviated output like you show it is pretty much
useless in parallel builds as it gets all jumbled up. No telling to
which target a certain output line belongs. I'd prefer

Entering source/blender/editors/animation
Scanning dependencies of target bf_editor_animation
  CMakeFiles/bf_editor_animation.dir/anim_channels_defines.c.o
  CMakeFiles/bf_editor_animation.dir/anim_channels_edit.c.o
  CMakeFiles/bf_editor_animation.dir/anim_deps.c.o
  CMakeFiles/bf_editor_animation.dir/anim_filter.c.o
  CMakeFiles/bf_editor_animation.dir/anim_ipo_utils.c.o
  CMakeFiles/bf_editor_animation.dir/anim_markers.c.o
  CMakeFiles/bf_editor_animation.dir/drivers.c.o
  CMakeFiles/bf_editor_animation.dir/fmodifier_ui.c.o
  CMakeFiles/bf_editor_animation.dir/keyframes_draw.c.o
  CMakeFiles/bf_editor_animation.dir/keyframes_edit.c.o
  CMakeFiles/bf_editor_animation.dir/keyframes_general.c.o
  CMakeFiles/bf_editor_animation.dir/keyframing.c.o
  CMakeFiles/bf_editor_animation.dir/keyingsets.c.o
Linking C static library ../../../../lib/libbf_editor_animation.a
[  1%] Built target bf_editor_animation
Entering source/blender/editors/armature
Scanning dependencies of target bf_editor_armature
  CMakeFiles/bf_editor_armature.dir/armature_ops.c.o
  CMakeFiles/bf_editor_armature.dir/editarmature.c.o
  CMakeFiles/bf_editor_armature.dir/editarmature_generate.c.o
  CMakeFiles/bf_editor_armature.dir/editarmature_retarget.c.o
  CMakeFiles/bf_editor_armature.dir/editarmature_sketch.c.o
  CMakeFiles/bf_editor_armature.dir/poseSlide.c.o
  CMakeFiles/bf_editor_armature.dir/poseUtils.c.o
  CMakeFiles/bf_editor_armature.dir/poselib.c.o
  CMakeFiles/bf_editor_armature.dir/poseobject.c.o
  CMakeFiles/bf_editor_armature.dir/reeb.c.o
Linking C static library ../../../../lib/libbf_editor_armature.a
[  2%] Built target bf_editor_armature Scanning dependencies of target
bf_editor_curve
Entering source/blender/editors/curve
  CMakeFiles/bf_editor_curve.dir/curve_ops.c.o
  CMakeFiles/bf_editor_curve.dir/editcurve.c.o
  CMakeFiles/bf_editor_curve.dir/editfont.c.o
Linking C static library ../../../../lib/libbf_editor_curve.a
[  2%] Built target bf_editor_curve
[  5%] Built target bf_editor_datafiles

I.e., the output object-file names are relative to the
CMAKE_CURRENT_BINARY_DIR. This way you still can tell to which target a
output line belongs, although in parallel builds you still lose the
directory information.

But honestly, I think that CMake is by no means too verbose. Your
proposal wouldn't change the number of lines displayed anyway, and for
large libraries with many source files it makes sense to have the
percentage there. Also, full paths are unambiguous.


My 2c

Michael


More information about the CMake mailing list