Both release and debug can be in CONFIG at the same time, and the last one wins (put CONFIG in a message to see the default). You want to use the CONFIG() function:
CONFIG(debug, debug|release) {
message("debug")
}
CONFIG(release, debug|release) {
message("release")
}
CONFIG(debug, debug|release) {
message("debug")
}
CONFIG(release, debug|release) {
message("release")
}
To copy to clipboard, switch view to plain text mode
and then:
$ qmake test.pro
Project MESSAGE: release
$ qmake CONFIG+=debug test.pro
Project MESSAGE: debug
$ qmake CONFIG+=release test.pro
Project MESSAGE: release
$ qmake test.pro
Project MESSAGE: release
$ qmake CONFIG+=debug test.pro
Project MESSAGE: debug
$ qmake CONFIG+=release test.pro
Project MESSAGE: release
To copy to clipboard, switch view to plain text mode
Bookmarks