llama-cpp-turboquant/config/FindSphinx.cmake
Fabian Sauter 6236f5b472 Improved find_program check and errors
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
2022-07-27 12:48:46 +02:00

16 lines
485 B
CMake

# Look for an executable called sphinx-build
find_program(SPHINX_EXECUTABLE
NAMES sphinx-build
DOC "Path to sphinx-build executable")
if(SPHINX_EXECUTABLE STREQUAL "SPHINX_EXECUTABLE-NOTFOUND")
message(FATAL_ERROR "sphinx-build not found.")
endif()
include(FindPackageHandleStandardArgs)
# Handle standard arguments to find_package like REQUIRED and QUIET
find_package_handle_standard_args(
Sphinx
"Failed to find sphinx-build executable"
SPHINX_EXECUTABLE)