On 13 September 2013 22:42, Stewart, Robert <robert.stew...@sig.com> wrote: > 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.
Robert, Am I getting it right, that you are trying to set a custom user-defined property with set_directory_properties (or set_property), like here: set_directory_properties(PROPERTIES MY_PROP "foo") You don't mean the "CMake, cache or environment variable" set with the command "set" by any chance? Best regards, -- Mateusz Loskot, http://mateusz.loskot.net "Participation in this whole process is a form of torture" ~~ Szalony -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake