Error and Output logs missing with v3.29.5

Hi, noticed after upgrading from v3.25.1 to v3.29.5 that neither CMakeOutput.log or CMakeError.log are being created.

Am on Mac Ventura (13.6), installing to /usr/local

Doing out of source builds with a folder for each app, a numbered folder indicating the version, and a build.cmake folder where everything gets made.

Was on v3.25.1 but (belatedly, if it ain’t broke don’t tend to fix it) noticed v3.29.5 was out so got that and compiled it.

After doing so, CMakeError.log and CMakeOutput.log were not created for the app I was trying to compile (latest MariaDB).

Used both configure and the existing CMake v3.25.1, same result.

Went back to v3.25.1 and CMakeOutput.log and CMakeError.log were again created during compilation.

Used the same build options for compiling both versions of CMake.

Have looked at the docs and intertubes and not found anything about CMakeOutput.log or CMakeError.log not being created anymore.

Grepping the build folder produced nothing usable.

Any insight on how to get output and error logs with v3.29.5 would be most appreciated.

Thanks!

Starting with CMake 3.26, CMake writes a file called CMakeFiles/CMakeConfigureLog.yaml instead. The 3.26 release notes did have an entry for this, but they didn’t mention specifically that CMakeOutput.log and CMakeError.log are no longer created.

There’s also a separate manual describing the new configure log: https://cmake.org/cmake/help/latest/manual/cmake-configure-log.7.html

Thanks, had noticed that file, but didn’t track to it being new or a replacement for Output / Error.

Cool. I wondered what had happened to the logs.

But…

Why doesn’t cmake record how it was invoked? Even with this log I still have to basically catch all terminal output. Is it so hard to “echo $0 $*”?

Keep in mind that the cmake command gets re-executed, possibly many times, and the set of command line options won’t be the same each time. The first invocation may provide a few essential details like the CMake generator, source and build directories, various CMake cache variables, and so on. Subsequent invocations might have no command line options at all, relying on details cached from previous runs.

I mention the above because it is relatively common when folks ask about accessing or saving the cmake command line that they want to somehow interpret or use that information, but they are either not aware or didn’t consider that most of the time, that command line won’t have anything but the cmake executable with no options.

Ok, the nested calls may be vacuous. That doesn’t mean that I don’t have an 80 line cmake invocation for a certain library with lots of options, and the first thing the developer asks me is “how did you invoke cmake”.

The fact that it’s not useful to you doesn’t mean that other people don’t have a use for it. “echo $0 echo $*” please?

While I’m at it, why isn’t cmake self-documenting? Why can’t I “cmake --help ” and it tells me all the options? Like autoconf?

Maybe don’t shoot the messenger, especially when they are trying to help you. :wink:

It should do that already. If you see any supported options missing, please file a bug report. If you see no output at all, that’s very much unexpected.

No, I mean “cmake --help “location of cmakelists”” and it tells me all the “-D whatever” options on the specific cmake file. (Oh dang. That’s what I typed initially, but I used angle brackets which this system interprets as a URL or something.)

CMake can’t know what options are defined without first running a configure step. It is the process of running configure that defines the cache variables. If you want to see an interactive list of variables after at least one configure step has been run, use the CMake GUI tool, or use ccmake if you only have a terminal without a graphical desktop environment. Then you can browse through the defined variables, including with some help text for each one.

Ok, feature request: make it easy for developers to add a line to the --help output?
(Have you ever used PETSc? Its configure help is multiple screens long, listing all of its hundreds of options and suboptions.)