From: Mathias Preiner Date: Wed, 21 Apr 2021 12:52:27 +0000 (-0700) Subject: cmake: Add optional module name argument for check_python_module helper. (#6406) X-Git-Tag: cvc5-1.0.0~1867 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=86aa9bc35ba9dc9a57913a2ffc71619c7657cc35;p=cvc5.git cmake: Add optional module name argument for check_python_module helper. (#6406) Addtionally adds checks for required documentation modules. --- diff --git a/cmake/Helpers.cmake b/cmake/Helpers.cmake index 2a94839e2..bb102e482 100644 --- a/cmake/Helpers.cmake +++ b/cmake/Helpers.cmake @@ -191,13 +191,17 @@ function(check_python_module module) RET_MODULE_TEST ERROR_QUIET ) + set(module_name ${ARGN}) + if(NOT module_name) + set(module_name ${module}) + endif() if(RET_MODULE_TEST) message(FATAL_ERROR - "Could not find module ${module} for Python " + "Could not find module ${module_name} for Python " "version ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}. " - "Make sure to install ${module} for this Python version " - "via \n`${PYTHON_EXECUTABLE} -m pip install ${module}'.\n" + "Make sure to install ${module_name} for this Python version " + "via \n`${PYTHON_EXECUTABLE} -m pip install ${module_name}'.\n" "Note: You need to have pip installed for this Python version.") endif() endfunction() diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 2890148b7..4e18c0ba9 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -14,6 +14,8 @@ ## find_package(Sphinx REQUIRED) check_python_module(breathe) +check_python_module(sphinxcontrib.bibtex sphinxcontrib-bibtex) +check_python_module(sphinx_tabs.tabs sphinx-tabs) add_subdirectory(cpp)