The present paper extends an established Riemann-based finite volume hydrocode for compressible pure water to admit change of phase. The thermal and caloric behaviour of water and water vapour is described by a one-fluid model on the assumption that the two-phase regime can be described locally within a finite volume cell as a homogeneous mixture that remains in thermodynamic equilibrium. Closure of the equation set is achieved by deriving equations of state for pure fluids and the mixture that cover all possible fluid states. Following a description of the flow model and the numerical method, computations are carried out to demonstrate the potential of the method. Calculations include a one-dimensional cavitation tube, one-dimensional condensation front, collapse of a cavitation bubble in water in one dimension, and an unsteady two-dimensional hypervelocity flow past a cavitating hydrofoil. Copyright © 2012 John Wiley & Sons, Ltd.