Hello,
how is it possible to do a custom compile step in the .pro file after each step (compiling cpp file)?
Hello,
how is it possible to do a custom compile step in the .pro file after each step (compiling cpp file)?
You can create custom "compilers" (generic term : uic, rcc and moc are compilers in qmake terms) to handle the content of variables or you create extra targets and specify whether they should be executed before or after compilation. All this is explained relatively clearly in the docs.
Current Qt projects : QCodeEdit, RotiDeCode
I just found how to execute commands after / before the linking step.
I want something in the Makefile like:
While <new command> should be a command that i want to enterQt Code:
a.cpp: a.h gcc -c a.cpp -o a.o <new command> b.cpp: b.h a.h gcc -c b.cpp -o b.o <new command>To copy to clipboard, switch view to plain text mode
this command should be after each gcc command.
I just found QMAKE_RUN_CXX, but i know, whether this is the right choice or not, because it does not work.
Did you take the trouble to follow the link on custom compilers above? This approach can satisfy your needs. It will require extra care to keep everything cross-platform though as you want to mess with SOURCES variable but it's doable for sure.
Current Qt projects : QCodeEdit, RotiDeCode
Bookmarks