Detect if we can build the documentation at cmake time

Merged Jørgen Lind requested to merge feature/jorgen.lind/cmake_build_doc into master

Merge request reports