Thought specifying -config you can run the scoped code.

Qt Code:
  1. debug {
  2. DEFINES += SD_DEV
  3. message("debug")
  4. }
  5.  
  6. release {
  7. message("release")
  8. }
  9.  
  10. qmake p.pro -config release
  11. Project MESSAGE: debug
  12. Project MESSAGE: release
To copy to clipboard, switch view to plain text mode 

Should I have only release message ?