<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 5, 2019 at 7:56 AM Christopher Dawes <<a href="mailto:christopher.dawes@eftlab.com">christopher.dawes@eftlab.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">



<div style="word-wrap:break-word;line-break:after-white-space">
Awesome thank you so much! So i’ve upgraded to <font face="Menlo"><span style="font-size:11px">3.15.3 and it’s told me perfectly my issue. So I have an override script (FindLibXml2.cmake):</span></font>
<div><font face="Menlo"><span style="font-size:11px"><br>
</span></font></div>
<div><span style="font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures">*********</span><span style="font-family:Menlo;font-size:11px">****************** START CODE </span><span style="font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures">*********</span><span style="font-family:Menlo;font-size:11px">******************</span></div>
<div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures"># FindLibXml2.cmake</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">#</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures"># A wrapper around CMake's FindLibXml2 which provides an imported target.</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
<span style="font-variant-ligatures:no-common-ligatures"></span><br>
</div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures"># Find LibXml2 using the built-in module</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">set(_cmake_module_path "${CMAKE_MODULE_PATH}")</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">set(CMAKE_MODULE_PATH)</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">include(FindLibXml2)</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">set(CMAKE_MODULE_PATH "${_cmake_module_path}")</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
<span style="font-variant-ligatures:no-common-ligatures"></span><br>
</div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">if(LibXml2_FOUND AND NOT TARGET LibXml2::LibXml2)</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">  add_library(LibXml2::LibXml2 INTERFACE IMPORTED)</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">  set_target_properties(LibXml2::LibXml2 PROPERTIES</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">    INTERFACE_LINK_LIBRARIES "${LIBXML2_LIBRARIES}"</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">    INTERFACE_INCLUDE_DIRECTORIES "${LIBXML2_INCLUDE_DIR}")</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">else()</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">  #<a href="https://github.com/Homebrew/homebrew-core/issues/6186" target="_blank">https://github.com/Homebrew/homebrew-core/issues/6186</a></span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">  if(APPLE)</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">    get_target_property(id LibXml2::LibXml2 INTERFACE_INCLUDE_DIRECTORIES)</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">    list(REMOVE_ITEM id "/usr/include/libxml2")</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">    set_target_properties(LibXml2::LibXml2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${id}")</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">  endif()</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">endif()</span></div>
</div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures"><br>
</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">*********</span>****************** END CODE <span style="font-variant-ligatures:no-common-ligatures">*********</span>******************</div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<br>
</div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">So the issue was:</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">  set(CMAKE_MODULE_PATH)</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures"><br>
</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">doesn’t work in cmake-server; also unset(CMAKE_MODULE_PATH) didn’t work either, when i do:</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures"><br>
</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">set(CMAKE_MODULE_PATH “/nonexistent”)</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures"><br>
</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">it all comes good; for some reason i think unset isn’t quite happy on cmake-server.</span></div></div></blockquote><div><br></div><div>Check that you don't also have a CMAKE_MODULE_PATH cache variable as well. If you unset the non-cache variable, it will effectively unmask the cache variable of the same name.</div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">
</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">Many thanks again for your quick response!</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures"><br>
</span></div>
<div>
<div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<b style="background-color:rgb(255,255,255)"><span lang="EN-US" style="font-size:13pt">Christopher Dawes</span></b><br style="background-color:rgb(255,255,255)">
<b style="background-color:rgb(255,255,255)"><span style="font-size:11pt">Principal Architect, EFTLab</span></b><b style="background-color:rgb(255,255,255)"><span style="font-size:11pt;font-family:Tahoma,sans-serif;color:windowtext"> </span></b><br style="background-color:rgb(255,255,255)">
<br style="background-color:rgb(255,255,255)">
<b style="background-color:rgb(255,255,255)"><span style="font-size:9pt">M:</span></b><span style="font-size:9pt;background-color:rgb(255,255,255)"> </span><span style="font-size:9pt;background-color:rgb(255,255,255)">+44
 (0)7899 842 759</span><br style="background-color:rgb(255,255,255)">
<b style="background-color:rgb(255,255,255)"><span style="font-size:9pt">E:</span></b><span style="font-size:9pt;background-color:rgb(255,255,255)"> <a href="mailto:christopher.dawes@eftlab.com" target="_blank">christopher.dawes@eftlab.com</a></span><br style="background-color:rgb(255,255,255)">
<b style="background-color:rgb(255,255,255)"><span style="font-size:9pt">A:</span></b><span style="font-size:9pt;background-color:rgb(255,255,255)"> </span><span style="font-size:9pt;background-color:rgb(255,255,255)">109
 Brighton Road, Sandgate, QLD 4017</span><br style="background-color:rgb(255,255,255)">
<br style="background-color:rgb(255,255,255)">
<b style="background-color:rgb(255,255,255)"><span style="font-size:8.5pt">IMPORTANT NOTICE</span></b><span lang="CS" style="background-color:rgb(255,255,255);font-size:8.5pt"> </span><br style="background-color:rgb(255,255,255)">
<span style="background-color:rgb(255,255,255);font-size:8pt">This message contains confidential information and is intended only for the addressee(s). E-mail transmission cannot be guaranteed to be secure or error-free as information could be
 intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. EFTlab Pty Ltd cannot accept liability for any errors or omissions in the contents of this message, which may arise as a result of e-mail transmission. Please note that
 EFTlab Pty Ltd may monitor, analyse and archive email traffic, data and the content of email for the purposes of security, legal compliance and staff training. If you have received this email in error please notify us at </span><span style="color:windowtext;background-color:rgb(255,255,255);font-size:11pt;font-family:Calibri,sans-serif"><a href="mailto:support@eftlab.com.au" target="_blank"><span style="font-size:8pt">support@eftlab.com.au</span></a></span><span style="background-color:rgb(255,255,255);font-size:8pt">. </span></div>
</div>
<div><br>
<blockquote type="cite">
<div>On 4 Sep 2019, at 19:39, Kyle Edwards via CMake <<a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a>> wrote:</div>
<br class="gmail-m_-8604999662652522008Apple-interchange-newline">
<div>
<div>On Wed, 2019-09-04 at 14:12 -0400, fdk17 wrote:<br>
<blockquote type="cite"><a href="https://github.com/microsoft/vscode-cmake-tools/issues/752" target="_blank">https://github.com/microsoft/vscode-cmake-tools/issues/752</a> states<br>
that it ran out of stack and the log shows what looks like to be<br>
involved with a recursive loop in some CMakeLists.txt.  A call depth<br>
of 27491 seems a bit excessive.<br>
<br>
After the second call to FindPackage it just seems to be doing the<br>
same thing over and over again.<br>
I'd think a newer version of CMake would complain about too much<br>
recursion in the project files.<br>
</blockquote>
<br>
Indeed, this was added in 3.14:<br>
<br>
<a href="https://cmake.org/cmake/help/v3.14/variable/CMAKE_MAXIMUM_RECURSION_DEP" target="_blank">https://cmake.org/cmake/help/v3.14/variable/CMAKE_MAXIMUM_RECURSION_DEP</a><br>
TH.html<br>
Kyle<br>
-- <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="https://cmake.org/mailman/listinfo/cmake" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>

-- <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/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/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/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/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/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a href="https://crascit.com" target="_blank">https://crascit.com</a><br></div><div><br></div><div>Get the hand-book for every CMake user: <a href="https://crascit.com/professional-cmake/" target="_blank">Professional CMake: A Practical Guide</a><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>