How to cut walls along the pitches of the roof
In this case, there should be no difficulty using Knife Project.


Select the roof, then the building
Put the (active) building into Edit Mode.
In an Orthographic view, looking straight down the roof ridge, hit 'Knife Project' in the Tool Region, Tools tab, Add section.
In the Knife Project tool's own panel, check 'Cut through'.
V Rip the newly created edges
Hovering over the unwanted faces, L select all linked, and delete them.