0

If I would write makefile by hand , I can do something like this

 CXX = @g++

 %.o: %.cpp makefile
        @echo Compiling $< ...
        $(CXX) -c $(FLAGS) $<

This would hide the executed command (thanks to @) but leaves all diagnostic and compiler's output. It would remove huge lists of parameters out of output log, but also would leave a comprehensive message.

I'm unable to reproduce this behaviour with Qmake, because all I can supply is a variable named QMAKE_CXX, content of which it would paste as a compiler, no way to insert a line break to my knowledge. Using these commands results in output like this

Compiling main.cpp...; @g++ -c -o main.o main.cpp

Can I organize output similar to manual compiler while using only QMAKE project file?

Swift - Friday Pie
  • 12,777
  • 2
  • 19
  • 42
  • 1
    Does `CONFIG += silent` looks okay? – Matt Nov 02 '18 at 18:05
  • @Matt Didn't knew of it it's not in written documentation. (and online one is blocked) Oh, so they use && and one @? I didn't thought of that. Almost does. It seem to have been bugged with UIC in version we use. Also sometimes need more than just echo. PS. Apparently QMAKE 4.x - 5.x unable to use QMAKE_UIC – Swift - Friday Pie Nov 03 '18 at 15:18

1 Answers1

0

Should be something like this:

 QMAKE_CXX = @echo "Message" && $$QMAKE_CXX

QMAKE apparently got undocumented QMAKE_UIC and QMAKE_MOC, with former being broken in some versions. Also an undocumented CONFIG += silent which replaces command lines with similar messages and uses same principle.

Swift - Friday Pie
  • 12,777
  • 2
  • 19
  • 42