  Bershadsky, Cecotti, Ooguri, and Vafa constructed a real-valued invariant for
Calabi--Yau manifolds, which is now called the BCOV torsion. Based on it, a
metric-independent invariant, called the BCOV invariant, was constructed by
Fang--Lu--Yoshikawa and Eriksson--Freixas i Montplet--Mourougane. The BCOV
invariant is conjecturally related to the Gromov--Witten theory via mirror
symmetry. Based upon the previous work of the second author, we prove the
conjecture that birational Calabi--Yau manifolds have the same BCOV invariant.
We also extend the construction of the BCOV invariant to Calabi--Yau varieties
with Kawamata log terminal singularities and prove its birational invariance
for Calabi--Yau varieties with canonical singularities. We provide an
interpretation of our construction using the theory of motivic integration.
