>>   I haven't seen that documented anywhere. IMHO this
>> behavior is counter-intuitive, in general I expect the scope of a
>> target to not depend on the cmake command I am trying to use.
>
>
> I think it is sensible that the definition of a target is scoped to one
> single directory.
> Where the definition of a target consists of e.g. sources, properties,
> dependencies and custom commands related to the target.
>
> You can reference/query global targets in other directories but you can not
> change them.

It seems sensible from a safety standpoint (preventing targets from
accidentally being modified from other directories) but it also
limiting in that
it prevents certain directory layouts (like the one I tried in my example).
-- 

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

Reply via email to