COMP: Only pass the documentation variables if BUILD_DOCUMENTION ON.

Change-Id: I0b737e1ef87d3d32df8b8489a9122a742e62876b
Merge topic 'SuperbuildDoc' into master

1637782a COMP: Only pass the documentation variables if BUILD_DOCUMENTION ON.