Don't print pygments error
authorRoland Schulz <roland.schulz@intel.com>
Tue, 23 Jun 2020 21:45:04 +0000 (14:45 -0700)
committerRoland Schulz <roland.schulz@intel.com>
Tue, 23 Jun 2020 22:44:27 +0000 (15:44 -0700)
Find modules shouldn't print tool errors to the cmake output.
These errors can be confusing because it is unclear whether
the error text applies to cmake or something else. Those
errors should go to log files. In this case logging doesn't
seem necessary. We didn't report the error until
b277931fcf4bc. And that commit claims to just fix a bug and
not increase verbosity. Therefore it was likely an
accidental change.

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")