[CMake] Inherited Directory Properties?

Stewart, Robert Robert.Stewart at sig.com
Fri Sep 13 17:42:05 EDT 2013


Matthew Woehlke wrote:
> On 2013-09-13 16:43, Stewart, Robert wrote:
> > I want a way to manage a list that applies to the current
> > directory and any subdirectories, unless overridden for a
> > subdirectory (which then applies to that subdirectory's
> > subdirectories).
> >
> > I tried using SET_DIRECTORY_PROPERTIES() to set/modify the
> > list, for the current directory, but GET_DIRECTORY_PROPERTY()
> > doesn't find that list when in a subdirectory (unless I've
> > made some mistake, of course).
> >
> > Is there a way to do what I want?
>
> What's wrong with a regular variable?

Ah, I forgot to mention that.  I'm using FUNCTION(), rather than
MACRO(), for the function that sets the value.  That means the
value doesn't escape to the caller.  What's worse, is that
function can be called by yet another function, so even using
PARENT_SCOPE isn't enough.

The values I'm setting should be accessible throughout the build
without any need to know the list's name or ensure it's
definition reaches the scope at the top of the call stack.

Using cached values doesn't work, of course, because then they
won't be tied to a directory (and its subdirectories).


_____
Rob Stewart
Software Engineer
Dev Tools & Components
Susquehanna International Group, LLP

________________________________

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.


More information about the CMake mailing list