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 e225adf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Expand Up @@ -75,6 +75,13 @@ else()
include(DownloadFmt)
endif()

find_package(PythonInterp)

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()

if(OPM_ENABLE_EMBEDDED_PYTHON AND NOT OPM_ENABLE_PYTHON)
# This needs to be here to run before source_hook
message(WARNING "Inconsistent settings: OPM_ENABLE_PYTHON=OFF and "
Expand Down

0 comments on commit e225adf

Please sign in to comment.