[CMake] problem with ADD_SUBDIRECTORY always inheriting all settings

Maarten Nieber hallomaarten at yahoo.com
Wed Feb 2 11:32:32 EST 2011


Thanks John, I've tried your suggestion and it works, so topic closed.
Best regards,
Maarten



________________________________
From: John Drescher <drescherjm at gmail.com>
To: Maarten Nieber <hallomaarten at yahoo.com>; CMake mailing list 
<cmake at cmake.org>
Sent: Tue, February 1, 2011 11:43:44 PM
Subject: Re: [CMake] problem with ADD_SUBDIRECTORY always inheriting all 
settings

On Tue, Feb 1, 2011 at 5:36 PM, Maarten Nieber <hallomaarten at yahoo.com> wrote:
> Hi John,
> thanks, but that only works one level deep, right? If you have a structure A
> -> B -> C, then C will always inherit all of A, regardless of where in B's
> CMakeList you put the ADD_SUBDIRECTORY.

No it depends where you put add_subdirectory on each level. Basically
any variable set (or other setting) before the call of
add_subdirectory will be inherited. If you put add_subdirectory as the
second line of each level (just after the project line) i do not
believe anything will be inherited from a to c.

John



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110202/35449d72/attachment.htm>


More information about the CMake mailing list