[cmake-developers] CMake 3.1 regression with incremental builds ?

Brad King brad.king at kitware.com
Fri Nov 7 09:51:39 EST 2014


On Thu, Nov 6, 2014 at 11:09 PM, Clinton Stimpson wrote:
> I've put in a fix for this.
> 580b668d genex: Preserve order while evaluating TARGET_OBJECTS

Thanks.  I bisected it down to

 cmTarget: Allow any generator expression in SOURCES property.
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5da9e51

where the problem was exposed by using the generator expression
to construct the list of sources.  However, the problematic code
was actually introduced at

 Genex: Evaluate TARGET_OBJECTS as a normal expression.
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf98cc25

Both of these were after 3.0 and before 3.1.

> Can we put this in RC 2?

Yes.  I added some comments, revised the commit message, and
merged to 'next' for testing:

 genex: Preserve order while evaluating TARGET_OBJECTS
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=caa4b7b8

On 11/07/2014 07:24 AM, David Cole via cmake-developers wrote:
> Is "objectSources" guaranteed to contain the same set of objects as "mapping"?

Yes.  Just above this context, mapping[] is populated by iterating over
objectSources.  Then ComputeObjectFilenames is called to fill in the
values of the map for each key.  It does not change the set of keys.

> isn't the GetOrCreateSourceFile call superfluous if you have a
> pointer to the source file object in the iterator...?

IIUC that is to create a cmSourceFile entry for the object file
corresponding to the source file.  They are different entries.

-Brad


More information about the cmake-developers mailing list