add compile switch for Beagle