Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build Qt Project in Debug Mode from Command line (aka bash script) in Linux

I already have a project with a .pro file that can be built in debug and release mode. So my question is what is the options on the commandline that I have to specify if I want to build my binaries with debug information. Here is an example building in release using a bash script:

cd ${CHECKOUT_DIR_DEV_OGL_DX_ENGINE_SKIA}; echo `date`: "Running \`qmake\` on Skia"; qmake&>${SKIA_LOG}; buildstatus $? "Running \`qmake\` on Skia"; echo `date`: "Running \`make\` on Skia"; make&>${SKIA_LOG}; buildstatus $? "Running \`make\` on Skia Please see ${SKIA_LOG}"; 

What do I need to add to get it now to also build in debug mode?

like image 936
Matthew Hoggan Avatar asked Jan 21 '12 01:01

Matthew Hoggan


People also ask

How do I run a shell script in debug mode in Linux?

The debugging options available in the Bash shell can be switched on and off in multiple ways. Within scripts, we can either use the set command or add an option to the shebang line. However, another approach is to explicitly specify the debugging options in the command-line while executing the script.


1 Answers

The option you need is "CONFIG+=debug". See General Configuration in qmake Manual.

#!/bin/bash qmake CONFIG+=debug ${qmake_options} make ${make_options} 
like image 200
Bill Avatar answered Sep 24 '22 10:09

Bill