Skip to content

Commit

Permalink
Set OPM_ENABLE_EMBEDDED_PYTHON=OFF for Python versions >= 3.12, there…
Browse files Browse the repository at this point in the history
… this is unfortunateley not supported
  • Loading branch information
lisajulia committed Apr 25, 2024
1 parent 1d780e6 commit f99abcd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ if (OPM_ENABLE_PYTHON)
message(SEND_ERROR "OPM requires python >= 3.3 but only version ${Python3_VERSION} was found")
endif()

if(OPM_ENABLE_EMBEDDED_PYTHON AND PYTHON_VERSION_MAJOR EQUAL 3 AND PYTHON_VERSION_MINOR GREATER_EQUAL 12)
message("Python version is 3.12 or larger, for this embedded Python is not supported, therefore setting OPM_ENABLE_EMBEDDED_PYTHON=OFF")
set(OPM_ENABLE_EMBEDDED_PYTHON OFF CACHE BOOL "Enable embedded python?" FORCE)
endif()

# Compatibility settings for PythonInterp and PythonLibs
# used e.g. in FindCwrap, pybind11
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
Expand Down

0 comments on commit f99abcd

Please sign in to comment.