Awesome thank you so much! So i’ve upgraded to 3.15.3 and it’s told me 
perfectly my issue. So I have an override script (FindLibXml2.cmake):

*************************** START CODE ***************************
# FindLibXml2.cmake
#
# A wrapper around CMake's FindLibXml2 which provides an imported target.

# Find LibXml2 using the built-in module
set(_cmake_module_path "${CMAKE_MODULE_PATH}")
set(CMAKE_MODULE_PATH)
include(FindLibXml2)
set(CMAKE_MODULE_PATH "${_cmake_module_path}")

if(LibXml2_FOUND AND NOT TARGET LibXml2::LibXml2)
  add_library(LibXml2::LibXml2 INTERFACE IMPORTED)
  set_target_properties(LibXml2::LibXml2 PROPERTIES
    INTERFACE_LINK_LIBRARIES "${LIBXML2_LIBRARIES}"
    INTERFACE_INCLUDE_DIRECTORIES "${LIBXML2_INCLUDE_DIR}")
else()
  #https://github.com/Homebrew/homebrew-core/issues/6186
  if(APPLE)
    get_target_property(id LibXml2::LibXml2 INTERFACE_INCLUDE_DIRECTORIES)
    list(REMOVE_ITEM id "/usr/include/libxml2")
    set_target_properties(LibXml2::LibXml2 PROPERTIES 
INTERFACE_INCLUDE_DIRECTORIES "${id}")
  endif()
endif()

*************************** END CODE ***************************

So the issue was:
  set(CMAKE_MODULE_PATH)

doesn’t work in cmake-server; also unset(CMAKE_MODULE_PATH) didn’t work either, 
when i do:

set(CMAKE_MODULE_PATH “/nonexistent”)

it all comes good; for some reason i think unset isn’t quite happy on 
cmake-server.

Many thanks again for your quick response!

Christopher Dawes
Principal Architect, EFTLab

M: +44 (0)7899 842 759
E: christopher.da...@eftlab.com<mailto:christopher.da...@eftlab.com>
A: 109 Brighton Road, Sandgate, QLD 4017

IMPORTANT NOTICE
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 
supp...@eftlab.com.au<mailto:supp...@eftlab.com.au>.

On 4 Sep 2019, at 19:39, Kyle Edwards via CMake 
<cmake@cmake.org<mailto:cmake@cmake.org>> wrote:

On Wed, 2019-09-04 at 14:12 -0400, fdk17 wrote:
https://github.com/microsoft/vscode-cmake-tools/issues/752 states
that it ran out of stack and the log shows what looks like to be
involved with a recursive loop in some CMakeLists.txt.  A call depth
of 27491 seems a bit excessive.

After the second call to FindPackage it just seems to be doing the
same thing over and over again.
I'd think a newer version of CMake would complain about too much
recursion in the project files.

Indeed, this was added in 3.14:

https://cmake.org/cmake/help/v3.14/variable/CMAKE_MAXIMUM_RECURSION_DEP
TH.html
Kyle
--

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:
https://cmake.org/mailman/listinfo/cmake

-- 

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:
https://cmake.org/mailman/listinfo/cmake

Reply via email to