Add python version sanity check for PDAL, since resulting library will match Python used for build, which may fail if version is not the one of the embedded Python.

pull/1843/head
Florian Nücke 2025-03-17 09:44:08 +01:00
rodzic 960decbcd0
commit c64c77d879
Nie znaleziono w bazie danych klucza dla tego podpisu
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -6,6 +6,12 @@ if (WIN32)
-DPython3_NumPy_INCLUDE_DIRS=${PYTHON_HOME}/lib/site-packages/numpy/core/include)
endif()
execute_process(COMMAND ${PYTHON_EXE_PATH} "-V" OUTPUT_VARIABLE PYTHON_VERSION)
string(STRIP ${PYTHON_VERSION} PYTHON_VERSION)
if(NOT (${PYTHON_VERSION} MATCHES "Python 3.8.1"))
message(FATAL_ERROR "Python 3.8.1 is bundled with ODM. To avoid version mismatches in built PDALPython libraries, please ensure this exact version is used during the build. Detected version: ${PYTHON_VERSION} (at ${PYTHON_EXE_PATH}).")
endif()
ExternalProject_Add(${_proj_name}
DEPENDS pdal
PREFIX ${_SB_BINARY_DIR}