1: \begin{abstract}
2: Let $\G$ be a graph product of finite groups, with finite underlying graph, and let $\Delta$ be the associated right-angled building.
3: We prove that a uniform lattice $\La$ in the cubical automorphism group $\Aut(\Delta)$ is weakly commensurable to $\G$ if and only if all convex subgroups of $\La$ are separable.
4: As a corollary, any two finite special cube complexes with universal cover $\Delta$ have a common finite cover.
5: An important special case of our theorem is where $\G$ is a right-angled Coxeter group and $\Delta$ is the associated Davis complex.
6: We also obtain an analogous result for right-angled Artin groups.
7: In addition, we deduce quasi-isometric rigidity for the group $\G$ when $\Delta$ has the structure of a Fuchsian building.
8: \end{abstract}
9: