Legally speaking, no it is not legal to camp overnight at an abandoned building, whether inside or outside.