My goal is to add my Qt project to a Jenkins buildserver, for nightly builds. Therefore I want to compile my project from the command line. I copied the buildsteps located in the build configuration:
"/opt/fslc-x11/2.5/sysroots/x86_64-fslcsdk-linux/usr/bin/qt5/qmake" "/home/xxxx/repositories/xxx/xxx.pro" -spec linux-oe-g++ && /usr/bin/make qmake_all
"/usr/bin/make"
I execute these commands in the build directory. The problem lies in the qmake command. The qmake command generates the makefile, but this makefile is different when I generate it in the command line instead of in QtCreator. The binary result after make is ofcourse very different.
It seems that the qmake command from the command line creates a debug makefile instead of a release makefile:
CFLAGS = -pipe -02 -pipe -g -feliminate-unused-debug-types --sysroot=.........
The -02 -pipe -g -feliminate-unused-debug-types
part is the only thing added when I run qmake in the command line (checked with diff).
I've tried the following:
- Added
CONFIG+=release
to the qmake command - Added
CONFIG-=DEBUG
to the qmake command
Furthermore I've verified that the system environment and the terminal emulator is the same.
My question comes down to:
- Why does qmake add the (debug) flags when running from the command line?
- Does QtCreator add more to the environment that I might have missed?
Let me know if you need more information about the settings or the makefile that is generated.