On 10/04/2016 05:46 PM, Stephen Kelly wrote: > This causes problems because now the code has to read the value for each > directory and can't assume that the value is always the same as the value > from the top-level CMakeLists file.
Many of these are honored only in the top-level directory anyway. Such cases could have documentation updated. Some of them may be per-`project()`. > Is the answer 'Use global properties or a cache variable instead'? The options need to be something easy for the project to set itself or for a user to set. A cache entry can work for that, but we don't really often read cache entries directly and instead read variables that fall back to cache entries if not defined. The scoping doesn't match the generator semantics exactly, but it is easy to use and hasn't been a big problem. -Brad -- 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://public.kitware.com/mailman/listinfo/cmake-developers