  Measurements of the heavy-flavour hadron production are a powerful tool to
study the nature of strong interaction and to understand the properties of
nuclear matter that is created in ultra-relativistic hadron-hadron collisions.
The excellent tracking and vertexing capabilities of the ALICE experiment,
together with its particle identification systems, allow for an efficient
identification and reconstruction of decays of hadrons that contain heavy
quarks. A selection of recent measurements on open heavy-flavour production
from pp collisions at $\sqrt{s}=7$ TeV and p--Pb collisions at
$\sqrt{s_{NN}}=5.02$ TeV, collected with the ALICE detector during the LHC
Run-1 phase, are discussed in this paper.
