The county commissioners of any of the several counties and the corporate authorities of any city of the third class located within such county, are hereby authorized to agree upon a site within the limits of such county, and to erect thereon a joint county and municipal building or buildings to be used by such county and city as a hospital for general purposes, or as a hospital for the care and treatment of communicable diseases, or both.
16 P.S. § 12101