Comprehensive: The good, the bad, and the ugly
I shot the Glock in .45, and bought the XDm in .40 4.5 inch barrel.
First things first: Decide what you're wanting to do with it. My choice was based on home defense and recreation. (though I might get a .22 for recreation so I don't kill myself on cost of ammo) This is not an EDC gun, and not really a basic learning gun (ammo prices, but YOU WILL need to learn anything you buy)
99% of why XD is in preference. I chose the system that seemed to me would be the easiest to become proficient with and put rounds on target. I coulda picked up a Glock and learned the grip angle, but why the extra effort when this system was more natural?
My major things: I liked the angle of the XDm better, I liked the trigger pull better. It is on par with the glock in terms of reliability. Nice capacity from factory. I think more than a comparable Glock (see the accessories note tho)
My minor things: I like redundant safety. Round chambered indicator, strike indicator. It's a notch on the top of the gun and back of the gun that will stick up if the gun is ready to fire and if there's a round in the chamber. I see this as more of a law enforcement role, keep eyes on target and verify the gun is ready to go, but I like having it there anyway. I see it as another safety feature. Another bonus for me was the XDGEAR pack. I got the gun, extra mag, holster, mag holder, mag loading tool, bore brush, gun lock, case (this is not some crap plastic case this is substantial and nice) For I want to say 20 or 40$ more.
My gripes: One down side of the XD is the Glock will have more accessory options. (like mags) Glock is the big name, everyone and their mother makes accessories for it. The XD is getting there, it's much more now than it was a few years back, but your options are going to be more limited and more pricey if you're into really tweaking your gun. That said, you won't need to, that's more of a hobby thing and I don't really do much with it. (check out the 1911 section sometime for gun modding
The axis is higher off the hand, meaning more flip and (in theory) harder to put rounds on target quickly. I shoot the XD better than the Glock, but they're the same as far as accuracy, both very accurate guns. It's going to come down to training with whatever you get.