Is it justified to bomb a country that's committing genocide?

I'm talking about hitting military targets, but there may be collateral damage.