If you sell the land for more than your adjusted cost base of the land, half of the resulting capital gain is included in your income as a taxable capital gain. (Unless you are in the business of selling land or you bought the land with the intention of resale, in which case it would be fully included as income from a business.)
So, if you sold both the building and the land as indicated above, at first blush you would have a fully deductible loss on the building but only a one-half inclusion on the land.
Unfortunately, the Income Tax Act provides a re-allocation rule in these circumstances. Generally, you must re-allocate some of the proceeds from the land to the building: the proceeds from the land, not exceeding the gain from the land, must be re-allocated to the building to reduce the terminal loss.