  In general relativity gravitational waves propagate at the speed of light,
however in alternative theories of gravity that might not be the case. We study
the effects of a modified speed of gravity, $c_T^2$, on the B-modes of the
Cosmic Microwave Background (CMB) anisotropy in polarisation. We find that a
departure from the light speed value would leave a characteristic imprint on
the BB spectrum part induced by tensors, manifesting as a shift in the angular
scale of its peaks. We derive constraints by using the available {\it Planck}
and BICEP2 datasets showing how $c_T^2$ can be measured, albeit obtaining weak
constraints due to the overall poor accuracy of the current BB power spectrum
measurements. The present constraint corresponds to $c_T^2 = 1.30 \pm 0.79$ and
$c_T^2< 2.85$ at $95%$ C.L. by assuming a power law primordial tensor power
spectrum and $c_T^2<2.33$ at $95%$ C.L. if the running of the spectral index is
allowed. We derive forecasts for the next generation CMB satellites, which we
find capable of tightly constraining $c_T^2$ at percent level, comparable with
bounds from binary pulsar measurements, largely due to the absence of
degeneracy with other cosmological parameters.
