  Bershadsky, Cecotti, Ooguri and Vafa constructed a real valued invariant for
Calabi-Yau manifolds, which is called the BCOV invariant. In this paper, we
consider a pair $(X,Y)$, where $X$ is a compact Kaehler manifold and
$Y\in\big|K_X^m\big|$ with $m\in\mathbb{Z}\backslash\{0,-1\}$. We extend the
BCOV invariant to such pairs. If $m=-2$ and $X$ is a rigid del Pezzo surface,
the extended BCOV invariant is equivalent to Yoshikawa's equivariant BCOV
invariant. If $m=1$, the extended BCOV invariant is well-behaved under blow-up.
It was conjectured that birational Calabi-Yau threefolds have the same BCOV
invariant. As an application of our extended BCOV invariant, we show that this
conjecture holds for Atiyah flops.
