+ # This is a workaround for older cmake versions
+ # (such as 2.8.7 on Ubuntu 12.04). These cmake versions do not provide the
+ # DOXYGEN_VERSION variable and hence, building the documentation will always
+ # fail. This code is the same as used in the cmake library, version 3.
+ if(DOXYGEN_EXECUTABLE)
+ execute_process(COMMAND ${DOXYGEN_EXECUTABLE} "--version" OUTPUT_VARIABLE DOXYGEN_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+ endif()
+