Compost won't attract hawks. A proper compost pile needs to be very large to be viable. Most sites will say that 1 cu. yd is sufficient. It isn't. A good hot compost pile should be closer to 5 cu. yds. to get enough heat to destroy weed seeds and break down the brown and green/nitrogenous waste.
That's true.
I forgot to mention that for a viable pile, the correct amount of moisture and turning are important. A wet, unturned (devoid of oxygen) pile will stink because that is were anaerobic bacteria lives. Aerobic bacteria are the best bet for breaking down waste products.
Aerobic bacteria thrive in the presence of oxygen. Anaerobic bacteria thrive in the absence of oxygen.
There are lots of videos on YouTube dealing with composting with chickens. I originally planned on putting one in the run then decided I would have to build some kind of roof over it to keep winter rains from making a slimy mess of it. I have a small aviary type run thing attached to the coop where I put dry leaves in. That turns into pretty nice compost.