From 3b52f6ec5739fcbd2094738b373ad61fc87fe9b1 Mon Sep 17 00:00:00 2001 From: Michael Wild Date: Thu, 2 Dec 2010 13:42:26 +0100 Subject: [PATCH] ENH: Check for bad Doxygen versions and warn Signed-off-by: Michael Wild --- CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b414dd61..bfd20d001 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -224,6 +224,20 @@ foam_option(FOAM_ENABLE_DOXYGEN_DOCS "Doxygen API documentation" # if user wants doxygen docs, find Doxygen and set up some options if(FOAM_ENABLE_DOXYGEN_DOCS) find_package(Doxygen REQUIRED) + execute_process(COMMAND ${DOXYGEN_EXECUTABLE} --version + RESULT_VARIABLE DOXYGEN_VERSION_RESULT + OUTPUT_VARIABLE DOXYGEN_VERSION_OUTPUT + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(DOXYGEN_VERSION_RESULT) + message(SEND_ERROR "Failed to determine doxygen version") + endif() + if(${DOXYGEN_VERSION_OUTPUT} VERSION_GREATER 1.6.3 AND + ${DOXYGEN_VERSION_OUTPUT} VERSION_LESS 1.7.2-20101106) + message(WARNING + "Found Doxygen version ${DOXYGEN_VERSION_OUTPUT}. " + "Versions newer than 1.6.3 and older than 1.7.2-20101106 " + "usually crash when processing the ${PROJECT_NAME} documentation.") + endif() foam_option(FOAM_DOXYDOCS_FOR_SF "Doxygen for SourceForge" "Build the Doxygen docs for deployment on SourceForge" OFF) # ask user whether she prefers local or www docs -- 2.11.4.GIT