Use cmake to mangage building