Does software compilation continue even if I close the lid of my MacBook Pro (7,1)?

As mentioned before, closing the lid of a portable Mac causes it to sleep, and not to dream of compilations as-yet unfinished.

What happens when I close the lid on my MacBook Pro running OS X?

If (and only if, apparently) your Mac is connected to:

  • an external display,
  • an external keyboard or mouse or trackpad
  • a power adapter,

your laptop will operate in "clamshell mode", as outlined here:

http://support.apple.com/en-ca/HT201834

and your compilation will continue.