Oh dear.

I managed to find a .deb of 2.6.0 and apparently there is some stupidity with my
original report:

* source files properties don't inherit, though the docs and some people's
  experience imply they do
* my older builds were (and still are) working by pure fluke!  Also for the same
  reason I thought I was seeing source file properties inherit when really it
  was the way I wrote the rules causing targets to be generating in a particular
  order.
* CMake doesn't seem to have the ability to detect that a source which is not on
  the file system is created with a custom_command, which is presumably why it
  uses the GENERATED property.  Furthermore, checking only happens if the source
  file does not *already* exist on disk; hence an incomplete make clean can
  obscure errors.
* the stricter checking of add_command (which is why I thought there was a bug)
  is actually trying to save me from myself by failing at configure when the
  build *might* have failed at make time.  Because of the previous point the
  detection is a bit fragile and reports a very odd error.

So in summary: the "workaround" I posted is actually what you're supposed to do;
the error message is reporting that I didn't do the "workaround"; and CMake
probably can't change the source file property behavior without breaking
backwards compatibility.

Sorry if I wasted time and thanks for the quick handling of the initial report
of this not-really-a-bug.  ;)

I did not write to the -close address because this behaviour might be weird
enough to warrant further scrutiny, but as far as I can see the matter is
resolved and, looking at the source, it certainly seems like this was intended
behavior.  (For reference: there is a cmLocalGenerator for each file which has
its own cmMakefile.  When add_* commands are encountered, the generator creates
a cmTarget, which calls cmMakefile::AddOrCreateSource on each source file.  This
will look into the *local* generator for cmSource objects (which hold source
properties).  The local generator/local makefile don't check their parents for
sources (though they do have references to them).  Therefore the cmSource in the
child directory will always be created instead of referenced, therefore it's
impossible to find a given source's properties if it wasn't declared under the
same local generator.)



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to