Fixed errors when using checkout location as cmake output directory.