<div dir="ltr">Gotcha...  yeah target definitions are available globally, in all directories after they are defined (source order is important).  I had never thought of this as a global variable or constant, but I guess in a way it is.<div>In that way, then I would think it is a sort of special case...  but I suppose the experts should chime in.</div><div><br></div><div>Steven</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 16, 2017 at 4:07 AM, René J.V. Bertin <span dir="ltr"><<a href="mailto:rjvbertin@gmail.com" target="_blank">rjvbertin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Friday September 15 2017 16:51:24 Steven Velez wrote:<br>
<br>
>Yeah... I didn't mean to respond personally... i didn't realize my client<br>
>was doing that and not the list.<br>
<br>
</span>OK, replying back to the list then.<br>
<span class=""><br>
>What do you mean by "variables related to targets have global scope"?<br>
<br>
</span>I probably could have been a bit less vague. Defining a target in a subdirectory sets something that behaves like a global variable (pardon, constant :)), at least for libraries. That's the whole point of that common_dir subtree: it defines library targets which are then used for linking the plugin.<br>
<span class="HOEnZb"><font color="#888888"><br>
R.<br>
</font></span><span class="im HOEnZb"><br>
><br>
>On Fri, Sep 15, 2017 at 3:44 PM, René J.V. Bertin <<a href="mailto:rjvbertin@gmail.com">rjvbertin@gmail.com</a>><br>
>wrote:<br>
><br>
>> On Friday September 15 2017 15:34:34 Steven Velez wrote:<br>
>><br>
>> Logically that's what I'd expect, but then the variables related to<br>
>> targets have global scope, variables set in a module directories too etc. I<br>
>> preferred to ask, so thanks :)<br>
>><br>
>> R.<br>
>><br>
>> >All directories in cmake have their own scopes which are initialized by<br>
>> the<br>
>> >scope of the parent directory.<br>
>> ><br>
>> >So, if you set the variables you wish to set in CMakeLists.txt of<br>
>> >common_libs, they should not influence the builds in the plugin directory,<br>
>> >but will influence the builds in that directory and subdirectories.<br>
>> ><br>
>> ><a href="https://cmake.org/cmake/help/v3.9/manual/cmake-language.7" rel="noreferrer" target="_blank">https://cmake.org/cmake/help/<wbr>v3.9/manual/cmake-language.7</a>.<br>
>> html#cmake-language-variables<br>
>> ><br>
>> >For more info.<br>
>> ><br>
>> >Steven<br>
<br>
</span><div class="HOEnZb"><div class="h5">--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>