[CMake] Quieting/speeding output

Alexander Neundorf a.neundorf-work at gmx.net
Mon Jul 26 16:08:44 EDT 2010


On Sunday 11 July 2010, Kevin Fitch wrote:
> I am transitioning from a make based build system to cmake, overall I am
> quite happy with cmake, but currently there are two snags:
>
> 1) The main project I am doing this on is quite large, it produces about
> 300 targets. So, when I type 'make' I get 300 or so lines of "[ 27%] Built
> target blah..." even when there is nothing (or very little) to do. This is
> quite annoying. I tried messing with CMAKE_RULE_MESSAGES. I just added
> -DCMAKE_RULE_MESSAGES=OFF to the cmake invocation. But that didn't seem to
> help.
>
> 2) The follow on to this is that a 'do-nothing' build still takes about 4
> seconds (or about 1.25 seconds for "make -j". The previous make based build
> was effectively instantaneous for a 'do-nothing' build. The do-nothing (or
> do very little) build is the common case so I hate to regress that far.
>
> Where should I be looking to address these issues?

If you want to build just one target, e.g. "foo", there are targets "foo/fast" 
which skip the dependency skipping of dependent targets, i.e. it doesn't 
check the dependencies of libraries against which foo links.

So, most of the time is spent in dependency checking.

Alex


More information about the CMake mailing list