[cmake-developers] Compile targets affected by changeset

Simon Richter Simon.Richter at hogyros.de
Fri May 19 02:32:22 EDT 2017


Hi,

On 18.05.2017 23:48, Robert Patterson via cmake-developers wrote:

> My company has a large, predominately C++ codebase, with hundreds of
> targets, both for product and unit tests.  In an effort to improve the
> compile and test time for developers, which utilizes a continuous
> integration infrastructure, it is desirable to compile only the targets
> that are affected by developer's change sets.

Erm, it should already work this way. If Make rebuilds a target that it
shouldn't, the first step would be investigating why it thinks the
target needs to be rebuilt.

Dependency tracking is one of the oldest problems, and cmake should use
an appropriate solution for the actual build system you use. The
approach used for Make is a bit more conservative than you would require
for GNU Make, but should nevertheless still work.

http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/

is a good primer on dependency list generation with Make -- CMake
generates rules that are similar to these.

> 'make' has a limitation where if 'make target1 target2 target3' is
> invoked, target1, target2, and target3 are built serially, not in
> parallel.

Which version of make are you using?

   Simon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20170519/4767ca99/attachment.sig>


More information about the cmake-developers mailing list