update cmake. reinstate some convenience funcs