Better testing method using separate cmake file