I have a CMakeLists.txt file and I run a command while building and if one of my libraries has an issue, then it will crash and it becomes close to impossible to debug unless you can run the debugger.
The fact is that I could tweak my CMakeLists.txt to run the command with gdb and get a stacktrace which helped much.
Here is the command I ran:
read more