Fixed compilation with clang (#15801)
This commit is contained in:
parent
9cc8bc882b
commit
1d5839fb92
@ -29,6 +29,8 @@ if [ -f /etc/lsb-release ] || [ -f /etc/debian_version ] ; then
|
||||
file \
|
||||
`# build tools` \
|
||||
build-essential \
|
||||
ninja-build \
|
||||
scons \
|
||||
ccache \
|
||||
"${cmake_packages[@]}" \
|
||||
"${x86_64_specific_packages[@]}" \
|
||||
@ -93,6 +95,8 @@ elif [ -f /etc/redhat-release ] || grep -q "rhel" /etc/os-release ; then
|
||||
`# build tools` \
|
||||
cmake3 \
|
||||
ccache \
|
||||
ninja-build \
|
||||
scons \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
make \
|
||||
@ -129,6 +133,8 @@ elif [ -f /etc/os-release ] && grep -q "raspbian" /etc/os-release; then
|
||||
`# build tools` \
|
||||
build-essential \
|
||||
ccache \
|
||||
ninja-build \
|
||||
scons \
|
||||
`# to find dependencies` \
|
||||
pkg-config \
|
||||
`# to deternime product version via git` \
|
||||
|
@ -21,7 +21,7 @@ endif()
|
||||
#
|
||||
|
||||
set(ov_python_req "${OpenVINOPython_SOURCE_DIR}/requirements.txt")
|
||||
set(ie_python_req "cython>=0.29.32")
|
||||
set(ie_python_req "${OpenVINOPython_SOURCE_DIR}/src/compatibility/openvino/requirements-dev.txt")
|
||||
|
||||
function(ov_check_python_build_conditions)
|
||||
# user explicitly specified ENABLE_PYTHON=ON
|
||||
@ -72,10 +72,10 @@ function(ov_check_python_build_conditions)
|
||||
set(ov_python_req_FOUND ON)
|
||||
|
||||
# check for Cython requirement for build IE API 1.0
|
||||
ov_check_pip_package(REQUIREMENT ${ie_python_req}
|
||||
RESULT_VAR ie_python_req_FOUND
|
||||
WARNING_MESSAGE "install python3 -m install ${ie_python_req} for IE API 1.0 requirements"
|
||||
MESSAGE_MODE TRACE)
|
||||
ov_check_pip_packages(REQUIREMENTS_FILE ${ie_python_req}
|
||||
RESULT_VAR ie_python_req_FOUND
|
||||
WARNING_MESSAGE "install python3 -m pip install -r ${ie_python_req} for IE API 1.0 requirements"
|
||||
MESSAGE_MODE TRACE)
|
||||
|
||||
# cython can be installed as a debian package, so pip requirements can be unsatisfied
|
||||
# so, let's check to find cython anyway
|
||||
@ -87,7 +87,7 @@ function(ov_check_python_build_conditions)
|
||||
if(CYTHON_VERSION VERSION_GREATER_EQUAL 0.29)
|
||||
set(ie_python_req_FOUND ON)
|
||||
else()
|
||||
message(${message_mode} "Python module '${ie_python_req}' is missed, IE Python API 1.0 will not be built (ENABLE_PYTHON is OFF)")
|
||||
message(${message_mode} "Python requirements '${ie_python_req}' are missed, IE Python API 1.0 will not be built (ENABLE_PYTHON is OFF)")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -508,7 +508,13 @@ private:
|
||||
void fill_data(const T& value) {
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wimplicit-const-int-float-conversion"
|
||||
# ifdef __has_warning
|
||||
# if __has_warning("-Wimplicit-const-int-float-conversion")
|
||||
# pragma clang diagnostic ignored "-Wimplicit-const-int-float-conversion"
|
||||
# elif __has_warning("-Wimplicit-int-float-conversion")
|
||||
# pragma clang diagnostic ignored "-Wimplicit-int-float-conversion"
|
||||
# endif
|
||||
# endif
|
||||
#elif defined(__GNUC__)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wsign-compare"
|
||||
|
10
src/plugins/intel_gpu/thirdparty/CMakeLists.txt
vendored
10
src/plugins/intel_gpu/thirdparty/CMakeLists.txt
vendored
@ -22,15 +22,15 @@ if(ENABLE_ONEDNN_FOR_GPU)
|
||||
set(ONEDNN_PREFIX_DIR "${CMAKE_CURRENT_BINARY_DIR}/onednn_gpu_root")
|
||||
set(ONEDNN_ENABLED_PRIMITIVES "CONCAT;CONVOLUTION;DECONVOLUTION;INNER_PRODUCT;MATMUL;REORDER;POOLING;REDUCTION")
|
||||
set(ONEDNN_ENABLED_ISA "XEHP;XEHPG;XEHPC")
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
|
||||
ie_add_compiler_flags(-Wno-undef -Wno-missing-declarations)
|
||||
if(SUGGEST_OVERRIDE_SUPPORTED)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11 AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
ie_add_compiler_flags(-Wno-error=array-bounds -Wno-error=stringop-overflow= -Wno-error=unused-result)
|
||||
endif()
|
||||
endif()
|
||||
if(SUGGEST_OVERRIDE_SUPPORTED)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override")
|
||||
endif()
|
||||
|
||||
foreach(cmake_var IN ITEMS CMAKE_SYSTEM_NAME CMAKE_SYSTEM_VERSION
|
||||
CMAKE_SYSTEM_PROCESSOR CMAKE_TOOLCHAIN_FILE)
|
||||
|
Loading…
Reference in New Issue
Block a user