title: Is there a cross platform way to detect debug mode compilation?
body: <p>Is there a cross platform way to detect debug mode compilation?  If not, then how to do it for the top compilers; MSVC, GNU &amp; MINGW, mac, clang, intel.</p>
  
  <p>For example MSVC you can detect debug mode like the following.</p>
  
  <pre><code>#if defined _DEBUG
  // debug related stuff here
  #else
  // release related stuff here
  #endif
  </code></pre>