Here's a little test .pro:
@CONFIG(debug) {
message(debug)
}
CONFIG(release) {
message(release)
}
CONFIG(debug, debug|release) {
message("debug, debug|release")
}
CONFIG(release, debug|release) {
message("release, debug|release")
}
@
With the outputs:
@$ qmake
Project MESSAGE: debug
Project MESSAGE: release
Project MESSAGE: debug, debug|release
$ qmake CONFIG-=release CONFIG+=debug
Project MESSAGE: debug
Project MESSAGE: debug, debug|release
$ qmake CONFIG-=release CONFIG-=debug
$ qmake CONFIG+=release CONFIG-=debug
Project MESSAGE: release
Project MESSAGE: release, debug|release
@
The second parameter seems to be which configuration options to check for. If I change the last check into
@CONFIG(release, debug|unrelease) {
message("release, debug|release")
}@
@$ qmake CONFIG+= release CONFIG-=debug
Project MESSAGE: release
@
If I change the check into
@CONFIG(release, release) {
message("release, debug|release")
}@
I get
@$ qmake CONFIG+=release CONFIG+=debug
Project MESSAGE: debug
Project MESSAGE: release
Project MESSAGE: debug, debug|release
Project MESSAGE: release, debug|release
@
Besides specifying the items to check for, some seem to take precedence. I'm not all too sure how this is determined. Anyway, I hope this at least clarifies something.