Cage traps are far more preferable to battling them hand to hand. Once you caged them you can smash them or melt them or whatever. plus you can release them in controlled amounts to be butchered by your military.
If, however, you are resolved to fight the undead face to face (you madman) then i advise cutting weapons (battle axes) as long as you can seperate the undead and the resulting viscera from their necromatic overlords. Legendary soldiers can take down undead in about equal quantities without taking casualties. The way to do this is using an airlock. Use two bridges to lure portions of undead into an airlock, shut it up and butcher them squads at a time. Clean the limbs out after each wave, lest a necromancer re-reanimte them. I would use a long corridor (to give the most time to shut the airlock at both ends) and a bend at the end to hide the undead from the sight of your soldiers until they are almost there. If a necromancer is in a wave you will have to deal with some re-reanimate limbs until he is dead, but no biggy, just make sure everything dies, and store the limbs somewhere safe.
There is a good argument to use blunt force weapons, as long as the undead you're facing are and will only be dwarf/human/elf/goblin sized. Blunt force in my experience works terribly against undead cows/giant wolverines/ forgotten beasts, because pulping large limbs is nearly impossibly, no matter how strong the macedwarf.