summaryrefslogtreecommitdiff
path: root/src/options
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2021-04-06 11:51:06 -0700
committerGitHub <noreply@github.com>2021-04-06 11:51:06 -0700
commit1fb3561da22565b92a5d31db6ce5d91877c897a1 (patch)
tree51fd4b7ce1147712158b9a2ddb05d931eb5922e5 /src/options
parenta2dc926f14b304aecf57975ee44903664b7ead30 (diff)
cmake: Add helper to check if a given Python module is installed. (#6299)
Diffstat (limited to 'src/options')
-rw-r--r--src/options/CMakeLists.txt16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/options/CMakeLists.txt b/src/options/CMakeLists.txt
index d3106b398..574432085 100644
--- a/src/options/CMakeLists.txt
+++ b/src/options/CMakeLists.txt
@@ -9,22 +9,8 @@
## directory for licensing information.
##
# Check if the toml Python module is installed.
-execute_process(
- COMMAND
- ${PYTHON_EXECUTABLE} -c "import toml"
- RESULT_VARIABLE
- RET_TOML
- ERROR_QUIET
-)
-if(RET_TOML)
- message(FATAL_ERROR
- "Could not find toml for Python "
- "version ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}. "
- "Make sure to install toml for this Python version "
- "via \n`${PYTHON_EXECUTABLE} -m pip install toml'.\nNote: You need to "
- "have pip installed for this Python version.")
-endif()
+check_python_module("toml")
libcvc4_add_sources(
base_handlers.h
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback