<div dir="ltr"><div>Thank you for advice Petr! I will go with this solution if can't find another one. CMake macroses are slightly weird so I'm trying to avoid them :)<br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 7, 2014 at 4:39 PM, Petr Kmoch <span dir="ltr"><<a href="mailto:petr.kmoch@gmail.com" target="_blank">petr.kmoch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Andrey.<br><br></div>As a workaround, you could make the calling context a macro instead of a function. Macros don't introduce variable scope.<br><br></div>Petr<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Nov 7, 2014 at 4:23 PM, Andrey Upadyshev <span dir="ltr"><<a href="mailto:oliora@gmail.com" target="_blank">oliora@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div>Hello!<br><br></div>I'm writing a wrapper around find_package so I call find_package from my own function. I found it's near impossible because all the variables set by finders remain in the scope of my wrapper function, rather than in the caller's scope. Is there any way to force find_package to set all variables in my function caller's scope? I.e. something like find_package(... PARENT_SCOPE)?<br><br></div>Thank you,<br>Andrey<br></div>
<br></div></div>--<br>
<br>
Powered by <a href="http://www.kitware.com" 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" target="_blank">http://www.cmake.org/Wiki/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" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br></div>
</blockquote></div><br></div>