There is also a really nice MAD effect where the window where you can hit a solar system without getting hit back is extremely short, like a century perhaps. Longer than that and we send a probe to the cannonball and turn it into diffuse gray goo that the solar wind blows away when it enters the system, and we return fire 1000 times over, so any logical civilization would send in the asteroid weapons much earlier, like the first time they sniff RF transmissions or the first dark side of the planet electric lights.
In the The Killing Star, our doom was already sealed by "Star Trek" :(
I think it's more practical in the long term to create a magnetic field at Mars itself. Using future technology on a scale unimaginable at present (and similar to that proposed in the linked article), we could magnetize Mars' (now-solid) ferrous materials by the onetime application of a very strong magnetic field.
Mars once had a dynamic magnetic field like ours, but Mars' liquid ferrous materials solidified as the planet cooled, which caused its field to disappear. A permanent field could be created by the deliberate application of a strong temporary field that would magnetize the planet's ferrous materials.
Details: http://arachnoid.com/restoring_mars/
I really don't think this is a good idea, unless we want a massive object accelerated to a significant percentage of c to get lobbed our way. :)
Disregarding the effects on atmosphere loss, wouldn't a machine like this eventually be more or less essential if humans ever decide to move in long term? At least, if we want to hang out on the surface (in bubbles, of course).