

Linking C static library libsegments.aĪdd the option -DCMAKE_RULE_MESSAGES:BOOL=OFF to your cmake command to disable them.Į.g. Building C object libs/segmentation/CMakeFiles/segments.dir/list_helpers.c.o Bonus To remove the ‘building’ and ‘linking’ lines from the outputĮ.g. Please note, you cannot disable verbose output using make VERBOSE=0 after you enable it through cmake, you need to execute the cmake command again without the -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON option. So, assuming you are in the folder where you want to make the build, execute the following to generate the Makefiles: cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON $path_to_project_source Īnd then just issue make to perform the build with verbose output. Option 3 – Add the variable -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON to your cmake commandĪdding the option -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON to the cmake command, it will enable verbosity on all generated Makefiles permanently. The caveat of this solution is that EVERYTHING becomes verbose, so you could have too many output data. Option 2 – Add the variable VERBOSE=1 to your make commandĪssuming you are using a terminal and you are in the folder where you want to build your project.Īfter you execute the command cmake $path_to_project_source Įxecute your make command using the VERBOSE=1 variable as follows make VERBOSE=1 Thus, you need to copy the configuration file to each CMakeLists.txt file you want to be verbose.

This option by itself is enough to enable verbosity.Ī caveat with this option is that the configuration is not passed on to other CMakeLists.txt files that are included to the build using the command add_subdirectory () from the master CMakeLists.txt file. We sure did and this is how we did it: Option 1 – Change your CMakeLists.txt filesĪs our first option, we present updating your CMakeLists.txt file to include the following configuration line: set(CMAKE_VERBOSE_MAKEFILE ON) 20 March 2017 in Programming tagged cmake / make / verbose by TuxĮver wanted to get more information out of a build process controlled by CMake?
