update platform checks to use cmake functions