> Use the cache only if the values need to be persistent. Otherwise I
> recommend using a GLOBAL property. See set_property() and get_property().
>
> Michael

Thank you Michael. Looks good. So let me summarize. The workflow
should looks like follow:

1. Top Level  CMakeLists.txt:
add_subdirectory( foo )

2. Level 2 foo/CMakeLists.txt
set_property ( GLOBAL P_A PROPERTY "some value")

3. Level 1 CMakeLists.txt
get_property ( VAR_A GLOBAL PROPERY P_A)
message (STATUS "VAR_A=${VAR_A})

is that's right?
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to