Skip to content
Snippets Groups Projects
Commit d811a324 authored by Lars Bilke's avatar Lars Bilke
Browse files

[CMake] Use newer Python find module.

parent d72518dc
No related branches found
No related tags found
No related merge requests found
......@@ -235,6 +235,9 @@ option(OGS_ENABLE_ELEMENT_PYRAMID "Build FEM elements for pyramids." ON)
option(OGS_CHECK_HEADER_COMPILATION "Check header for standalone compilation." OFF)
option(OGS_USE_PYTHON "Interface with Python" OFF)
if(OGS_USE_PYTHON AND NOT Python_FOUND)
message(FATAL_ERROR "Python not found but required for OGS_USE_PYTHON=ON!")
endif()
option(OGS_USE_MFRONT "Enable solid material models by MFront (https://tfel.sourceforge.net)" OFF)
......
......@@ -22,7 +22,7 @@ else()
message(STATUS "No lcov coverage report generated because lcov or genhtml was not found.")
endif()
if(PYTHON_EXECUTABLE)
if(Python_EXECUTABLE)
setup_target_for_coverage_gcovr_xml(
NAME testrunner_coverage_cobertura
EXECUTABLE ${CMAKE_COMMAND} --build . --target tests
......
......@@ -9,7 +9,7 @@ find_program(GPROF_PATH gprof DOC "GNU profiler gprof" QUIET)
find_program(CPPCHECK_TOOL_PATH cppcheck)
find_package(PythonInterp QUIET)
find_package(Python COMPONENTS Interpreter Development)
# Find bash itself ...
find_program(BASH_TOOL_PATH bash
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment