Skip to content

Commit

Permalink
PYBE RHEL
Browse files Browse the repository at this point in the history
  • Loading branch information
fpetrini15 committed Oct 23, 2024
1 parent a2564ea commit fbcd1f5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ FetchContent_Declare(
GIT_TAG "aa304c9c7d725ffb9d10af08a3b34cb372307020"
GIT_SHALLOW ON
)

# RHEL base container has multiple version of Python installed. By default
# it seems like pybind will pickup v3.6, so we specifically assign it to
# search for 3.12 here.
if(LINUX)
file(STRINGS "/etc/os-release" DISTRO_ID_LIKE REGEX "ID_LIKE")
if(${DISTRO_ID_LIKE} MATCHES "rhel|centos")
set(PYBIND11_PYTHON_VERSION 3.12)
endif(${DISTRO_ID_LIKE} MATCHES "rhel|centos")
endif(LINUX)
FetchContent_MakeAvailable(pybind11)

#
Expand Down

0 comments on commit fbcd1f5

Please sign in to comment.