Skip to content

Filing a build log

Felipe Torrezan edited this page Feb 23, 2024 · 1 revision

Introduction

The build verbosity in CMake can be adjusted to retrieve the full build log.

Helpful Resources

Description

  • When building a CMake-configured project, use the --verbose so that the command lines used for building are shown in the standard output:
cmake --build . --clean-first --verbose
Change Dir: '/home/user/cmake-tutorial/tutorial/build'

Run Clean Command: /usr/bin/ninja -v clean
[1/1] /usr/bin/ninja  -t clean
Cleaning... 0 files.

Run Build Command(s): /usr/bin/ninja -v
[1/2] /opt/iarsystems/bxarm-9.50.1/arm/bin/iccarm  --silent '/home/user/cmake-tutorial/tutorial/tutorial.c   -e --cpu=cortex-m4 --dependencies=ns CMakeFiles/tutorial.dir/tutorial.o.d -o CMakeFiles/tutorial.dir/tutorial.o
[2/2] : && /opt/iarsystems/bxarm-9.50.1/arm/bin/ilinkarm CMakeFiles/tutorial.dir/tutorial.o --silent   --semihosting   -o tutorial.elf && :
  • For filing the standard output in the previous command, use the > redirector:
cmake --build . --clean-first --verbose > build.log
Clone this wiki locally