  We construct $C^\infty$ solutions to the one-dimensional nonlinear wave
equation $$ u_{tt} - u_{xx} - \tfrac{2(p+2)}{p^2} |u|^p u=0 \quad \text{with}
\quad p>0 $$ that blow up on any prescribed uniformly space-like $C^\infty$
hypersurface. As a corollary, we show that smooth solutions can blow up (at the
first instant) on an arbitrary compact set.
  We also construct solutions that blow up on general space-like $C^k$
hypersurfaces, but only when $4/p$ is not an integer and $k > (3p+4)/p$.
