[CMake] Propagating variable to toplevel parent

Mathieu Malaterre mathieu.malaterre at gmail.com
Fri Jul 9 09:51:35 EDT 2010


On Wed, Jul 7, 2010 at 3:06 PM, Michael Wild <themiwi at gmail.com> wrote:
> project(bla NONE)
>
> set_property(GLOBAL PROPERTY v "13")
> add_subdirectory(foo)
> get_property(v GLOBAL PROPERTY v)
> message("final v: ${v}")
>
>
> For properties you must always use getters and setters, they are never directly mapped to variables.

Cool ! Work like a charm.

Thanks
-- 
Mathieu


More information about the CMake mailing list