How to print build and link commands in Cmake?

Asked

Viewed 61 times

1

I have a project that uses the Cmake and would like to print the build commands generated by it. How to do this?

2 answers

1


If you want the build commands at all times are printed, place the following line in the CMakeLists.txt:

SET(CMAKE_VERBOSE_MAKEFILE ON)

If you want to print the build commands only a few times, after running Cmake, run the make as follows:

make VERBOSE=1

0

I’m not sure I understand the question, but if you want to print a message like "Generating Objects" or "linking libraries" just put it like this after each rule

all: dependencia1 dependencia2 ....
    @echo "Gerando executavel"

and it will print this string when performing this rule.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.