Implemented cmake and allow for optional build paramaters