Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement Qt qmake tool dry run mode

Tags:

qt

qmake

I just want to use qmake as pro-files parser for extracting project variables (like SOURCES), nothing more. I don't need to generate makefiles.

In other similar tools "dry run" mode usually presents. I.e. "just taste this thing, but do nothing with it". Unfortunately qmake don't have such mode, but can i emulate it with some, probably ugly||hacky way?

Now i'm trying to remove all "generation"-code from qmake source, but it is hard and long task. And i'm like simple decisions :)

like image 659
eraxillan Avatar asked Dec 18 '25 01:12

eraxillan


1 Answers

The simplest way is to give the -E option to qmake. It will dump the contents of the project variables and continue without generating the makefile.

It is equivalent to the code snippet given in previous edition of this post, but dumps all of the variables and requires no changes to qmake :)

like image 174
Kuba hasn't forgotten Monica Avatar answered Dec 20 '25 16:12

Kuba hasn't forgotten Monica