Don't print pygments error
[alexxy/gromacs.git] / cmake / FindSphinx.cmake
index f78aae177d195a7691c075c8d4ec5fd33aa338d2..13bd5d4edc1e026e37dbeb61205e1e3e15378c32 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2015,2018,2019, by the GROMACS development team, led by
+# Copyright (c) 2015,2018,2019,2020, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -65,10 +65,6 @@ if (SPHINX_EXECUTABLE AND NOT DEFINED SPHINX_EXECUTABLE_VERSION)
     set(SPHINX_EXECUTABLE_VERSION ${_version} CACHE INTERNAL "Version of ${SPHINX_EXECUTABLE}")
 endif()
 
-set(_find_deps_options)
-if (Sphinx_FIND_QUIETLY)
-    set(_find_deps_options ERROR_QUIET)
-endif()
 
 if (NOT Sphinx_pygments_FOUND)
     # Check if pygments module is available via the Unix error code (ie. 0
@@ -76,7 +72,7 @@ if (NOT Sphinx_pygments_FOUND)
     execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
         "import pygments"
         RESULT_VARIABLE _pygments_status
-        ${_find_deps_options}
+        ERROR_QUIET
         )
     if (_pygments_status EQUAL 0)
         set(Sphinx_pygments_FOUND TRUE CACHE BOOL "Whether pygments module is available for Sphinx")