Compile entire compilation unit for device

Is there any way to compile an entire compilation unit as device code rather than marking every function?