Converted classgen to using external cmake file