The booming blade and green-flame blade cantrips from the Sword Coast Adventurer's Guide both have the particularity of including a single melee weapon attack as part of their casting.
Several martial abilities, like Extra Attack or the Martial Arts’s bonus attack, do not work with these cantrips because they require the Attack action to be used.
However, the Hunter Ranger's Horde Breaker ability (which lets you do an additional attack on another target with the same weapon once per turn) only requires an attack with a weapon, not necessarily the Attack action. Therefore, I’m wondering if a Hunter Ranger with Horde Breaker could get that additional-attack-on-different-target-with-same-weapon when using booming blade or green-flame blade.
Best Answer
Yes
Horde Breaker states (PHB, p. 93, bold added):
For both Green Flame Blade and Booming Blade, you do make a weapon attack:
Note that you won't get any of the benefits of either spell a second time for the second attack, as explained in V2Blast's answer to this Q&A: Can Green-Flame Blade be cast twice with the Hunter ranger's Horde Breaker ability?