PDA

View Full Version : qmake with simultaneous debug and release



TorAn
29th April 2013, 11:56
I have following settings in Qt Creator:
Build configuration: Release
Build Steps: qmake.exe DataManager.pro -r -spec win32-msvc2012 "CONFIG+=release"
Build is selected as "Release"

My test project.pro:
TEMPLATE = app
QT += core sql network xml widgets gui
DEFINES += QT_LARGEFILE_SUPPORT QT_XML_LIB QT_NETWORK_LIB QT_DLL
message(config: $$CONFIG)

Output from qmake:
config: lex yacc debug exceptions depend_includepath testcase_targets import_plugins import_qpa_plugin rtti_off incremental_off windows qt warn_on release link_prl incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe copy_dir_files debug shared rtti qpa win32 msvc release

Question:
1. Why, even if "Release" build is selected, I am still having "debug" in config?
2. If I add this:
CONFIG -= debug_and_release
CONFIG -= debug_and_release_target
I am still getting debug and release settings in config?
config: lex yacc debug exceptions depend_includepath testcase_targets import_plugins import_qpa_plugin rtti_off incremental_off windows qt warn_on release link_prl incremental flat precompile_header autogen_precompile_source embed_manifest_dll embed_manifest_exe copy_dir_files debug shared rtti qpa win32 msvc release

TorAn
30th April 2013, 17:35
I understand that if "release" option in CONFIG is specified then "debug" is ignored.
But how should I do conditional setup in .pro file when both "release" and "debug" are there?

CONFIG(release) {
}
will execute, but so is
CONFIG(debug) {
}

TorAn
1st May 2013, 11:01
Solved. CONFIG(debug, debug | release)