A nonconforming building which has been legally condemned shall not be rebuilt or used except in accordance with the provisions of this chapter.