[CMake] Silent crash on infinite recursion

J Decker d3ck0r at gmail.com
Wed Oct 25 07:31:35 EDT 2017


If a script recursively calls itself (ir indirectly causes a infinite
recursion of includes) cmake silently exits, and does not tell why.

I finally managed to get cmake --trace-expand --debug-output .. to show
some useful information.
--debug-output with --build causes cmake to try to run in configure mode
instead of building...

----- CMakeLists.txt ---------
cmake_minimum_required(VERSION 3.6)
include( brokenScript )
--------------------

----- brokenScript ---------
include( brokenScript )
-------------------

(Yes, this shouldn't be done in the first place; but I ended up generating
a script over another script of the same name that was expecting originally
to be built into a separate directory)

having the above two files, and making a build directory and from the build
directory doing 'cmake ..' does compiler detection then exits with an error
code.  Cmake-gui (on windows) trying to do a generate crashes with an
exception.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20171025/1713e2d2/attachment.html>


More information about the CMake mailing list