Updated script for cmake