3
votes

Environment: Ubuntu 14.04, Qt 4.8.x

I have a bunch of Qt library projects and one application project. I would like to build all of them with debug information. I could modify each of the .pro file for debug information. However, I am wondering if there is an environmental variable or some global mechanism I can set to force qmake to build all the projects with debug enabled. Regards.

1

1 Answers

1
votes

You could always write an alias for doing qmake CONFIG+=debug automatically.

Otherwise, replace the release entry in your QT_CONFIG variable with debug in the Qt config file which resides in this location on my Debian stable machine:

/usr/share/qt4/mkspecs/qconfig.pri

or Archlinux:

/usr/lib/qt/mkspecs/qconfig.pri

Of course, if you build Qt yourself, you can also choose the corresponding option when using the configure script:

-debug ............. Compile and link Qt with debugging turned on.
-debug-and-release . Compile and link two versions of Qt, with and without
                     debugging turned on (Mac only).