Silent crash on infinite recursion

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Silent crash on infinite recursion

J Decker
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.


Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: