Use FindPython3.cmake (#19847)

* Use FindPython3.cmake

* Fixed compilation on macOS 14 with new core development tools

* Try to use Python3_SOABI instead of PYTHON_MODULE_EXTENSION

* Use Development.Module

* Keep specifying only Python3_EXECUTABLE

* Print PYTHON_MODULE_EXTENSION

* Added check for minimal cmake version for python API

* Returned Python3_INCLUDE_DIR for cross-compilation case

* Try to allow cmake older than 3.18

* Use build python interpreter to check cython dependency

* revert changes in .ci/openvino-onnx/Dockerfile

* removed unused code

* Fixed issue with variables scope

* Experiment: remove include dirs

* Corrected docs

* Use pybind11 function to set extension

* Revert "Experiment: remove include dirs"

This reverts commit 6f7f90211c.

* Refactor ConvolutionBackpropDataLayerTest, ConvolutionLayerTest, DeformableConvolutionLayerTest (#19810)

* Refactor ConvolutionBackpropDataLayerTest

* Refactor ConvolutionLayerTest

* Refactor DeformableConvolutionLayerTest

* Apply comments

* Apply comments

* Fix

* Updated minimum cmake version for Windows

* Simplified check

* Removed useless message status

* Use puiblic option

---------

Co-authored-by: Oleg Pipikin <oleg.pipikin@intel.com>
This commit is contained in:
Ilya Lavrenov
2023-09-26 22:57:29 +04:00
committed by GitHub
parent 7852b44c5f
commit 8349849e1c
53 changed files with 237 additions and 238 deletions

View File

@@ -6,6 +6,7 @@
# Google Tests framework
#
set(CMAKE_DISABLE_FIND_PACKAGE_PythonInterp ON)
set(gtest_force_shared_crt ON CACHE BOOL "disable static CRT for google test")
set(BUILD_SHARED_LIBS OFF)

View File

@@ -23,14 +23,12 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
ov_add_compiler_flags(/wd4244)
endif()
set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}")
set(ONNX_USE_PROTOBUF_SHARED_LIBS OFF CACHE BOOL "Use dynamic protobuf by ONNX library" FORCE)
set(ONNX_NAMESPACE ${OV_ONNX_NAMESPACE})
set(ONNX_USE_LITE_PROTO ${ONNX_USE_LITE_PROTO_DEFAULT} CACHE BOOL "Use protobuf lite for ONNX library" FORCE)
set(ONNX_ML ON CACHE BOOL "Use ONNX ML" FORCE)
set(ONNX_CUSTOM_PROTOC_EXECUTABLE ${PROTOC_EXECUTABLE})
# clear Python_ADDITIONAL_VERSIONS to find only python library matching PYTHON_EXECUTABLE
unset(Python_ADDITIONAL_VERSIONS CACHE)
set(ONNX_CUSTOM_PROTOC_EXECUTABLE "${PROTOC_EXECUTABLE}")
# build targets