[CMake] Build logging
cmake.org › pipermail › cmakeAug 18, 2010 · Is there anyway i can log the output of the > > makefile that gets generated to another file ? maybe by modifying > > something in the CMakeLists ?? > > I would like this as well, but I don't think CTest will provide it. > > What we do is run something like "ctest -S script.cmake -VV > build.log > 2>&1".
Custom Commands — Mastering CMake
cmake.org › cmake › helpFor those more familiar with Visual Studio, it adds a custom build step to a file. add_custom_command has two main signatures: one for adding a custom command to a target and one for adding a custom command to build a file. The target is the name of a CMake target (executable, library, or custom) to which you want to add the custom command.
cmake(1) — CMake 3.23.0-rc2 Documentation
cmake.org › cmake › helpTo make a log level persist between CMake runs, set CMAKE_MESSAGE_LOG_LEVEL as a cache variable instead. If both the command line option and the variable are given, the command line option takes precedence. For backward compatibility reasons, --loglevel is also accepted as a synonym for this option.