CMakeError.log confuses new users

At work when a user has problems with CMake the very first thing they do when contacting me is send me a copy of their CMakeError.log

The problem is that the CMakeError.log almost never has the problem they are experiencing. CMakeError.log is really only useful when the project call fails.

I then provide them instructions on what I need to figure out their issue.

This is mainly a workflow issue with new CMake users. More experienced developers don’t generally have this problem.

Thoughts?

Huh. I usually need to point people to the CMakeError.log file at all (it is also used in try_compile situations I think). I’m not sure what CMake itself can do here.

FWIW, my bad reports usually involve red herrings in the form of harmless warnings or missing context such as lacking the backtrace or it being some domino error that doesn’t matter because things fell apart in the scrollback and that got missed.

Here is usually what I ask for in these situations:

# Redirect stdout/stderr into 1 log file with DEBUG enabled
cmake -B build/vs --log-level=DEBUG *> cmake_log.txt

There is related discussion in CMake Issue 22131.

1 Like