We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2564ea commit fbcd1f5Copy full SHA for fbcd1f5
CMakeLists.txt
@@ -92,6 +92,16 @@ FetchContent_Declare(
92
GIT_TAG "aa304c9c7d725ffb9d10af08a3b34cb372307020"
93
GIT_SHALLOW ON
94
)
95
+
96
+# RHEL base container has multiple version of Python installed. By default
97
+# it seems like pybind will pickup v3.6, so we specifically assign it to
98
+# search for 3.12 here.
99
+if(LINUX)
100
+ file(STRINGS "/etc/os-release" DISTRO_ID_LIKE REGEX "ID_LIKE")
101
+ if(${DISTRO_ID_LIKE} MATCHES "rhel|centos")
102
+ set(PYBIND11_PYTHON_VERSION 3.12)
103
+ endif(${DISTRO_ID_LIKE} MATCHES "rhel|centos")
104
+endif(LINUX)
105
FetchContent_MakeAvailable(pybind11)
106
107
#
0 commit comments