  We give a notion of BV function on an oriented manifold where a volume form
and a family of lower semicontinuous quadratic forms $G_p: T_pM \to [0,\infty]$
are given. When we consider sub-Riemannian manifolds, our definition coincide
with the one given in the more general context of metric measure spaces which
are doubling and support a Poincar\'e inequality. We then focus on finite
perimeter sets, i.e., sets whose characteristic function is BV, in
sub-Riemannian manifolds. Under an assumption on the nilpotent approximation,
we prove a blowup theorem, generalizing the one obtained for step-2 Carnot
groups in [24].
