I have a project that uses CMake and would like to print the build commands it generates. How to do this?
I have a project that uses CMake and would like to print the build commands it generates. How to do this?
If you want the always compilation commands to be printed, put the following line in CMakeLists.txt
:
SET(CMAKE_VERBOSE_MAKEFILE ON)
If you want to print the compilation commands only a few times, after running CMake, run make
as follows:
make VERBOSE=1
I do not know if I understand the question well, but if you want to print a message like "Generating Objects" or "linking libraries" just put it after each rule
all: dependencia1 dependencia2 ....
@echo "Gerando executavel"
and it will print this string when you are performing this rule.