From 566d5f0ee5f6dbb6d1fea1466b32df959c32a958 Mon Sep 17 00:00:00 2001 From: Paul Bauer Date: Wed, 28 Nov 2018 14:39:53 +0100 Subject: [PATCH] Make Imagemagick availability more visible Changes the message type for the gmxTestImagemagick test to be a warning when GMX_BUILD_MANUAL is ON, to make sure users see that there may be an issue with building the full documentation. Also change the test script to see if the new file actually gets created, instead of checking the return code. Refs #2778 Change-Id: I52ca5e0143bad396d0e6cfe610dac1bb13621e5f --- cmake/gmxTestImageMagick.cmake | 11 ++++++++--- docs/CMakeLists.txt | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cmake/gmxTestImageMagick.cmake b/cmake/gmxTestImageMagick.cmake index b784f7e4c3..0da9042821 100644 --- a/cmake/gmxTestImageMagick.cmake +++ b/cmake/gmxTestImageMagick.cmake @@ -58,12 +58,17 @@ function(GMX_TEST_IMAGEMAGICK VARIABLE) OUTPUT_QUIET ERROR_QUIET ) - FILE(REMOVE_RECURSE ${TEMPDIR}) - if (${TEST_OUTPUT} EQUAL 0) + if (EXISTS ${SAMPLE_OUTPUT}) set(value_ ON) else() - MESSAGE(STATUS "Could not convert sample image, ImageMagick convert can not be used") + if (GMX_BUILD_MANUAL) + set(type_ "WARNING") + else() + set(type_ "STATUS") + endif() + MESSAGE(${type_} "Could not convert sample image, ImageMagick convert can not be used") endif() + FILE(REMOVE_RECURSE ${TEMPDIR}) endif() set(${VARIABLE} ${value_} CACHE INTERNAL "Test if image conversion works") mark_as_advanced(${VARIABLE}) diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 0026e3593b..b4fdbb4626 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -124,7 +124,7 @@ else() set(MANUAL_BUILD_NOT_POSSIBLE_REASON "pdflatex is not available") elseif(NOT IMAGE_CONVERT_POSSIBLE) set(MANUAL_BUILD_IS_POSSIBLE OFF) - set(MANUAL_BUILD_NOT_POSSIBLE_REASON "ImageMagick convert is not available") + set(MANUAL_BUILD_NOT_POSSIBLE_REASON "a working form of ImageMagick convert is not available") set(NO_IMAGE_CONVERT_REASON "Can not convert files for online or pdf manual") # TODO Later, identify other dependencies like bibtex, # make_index, date, some graphics conversion program, -- 2.11.4.GIT