Switch to CM build system