Reverted OV_CPACK_COMPILER_IS_CLANG

This commit is contained in:
Ilya Lavrenov
2022-03-26 13:55:52 +03:00
parent 8cf4d15d4d
commit e65d2e8097
11 changed files with 15 additions and 15 deletions
@@ -165,7 +165,7 @@ function(ov_disable_all_warnings)
foreach(target IN LISTS ARGN)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(${target} PRIVATE /WX-)
elseif(CMAKE_COMPILER_IS_GNUCXX OR OV_CPACK_COMPILER_IS_CLANG)
elseif(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
target_compile_options(${target} PRIVATE -w)
elseif(UNIX AND CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
# 193: zero used for undefined preprocessing identifier "XXX"
@@ -44,7 +44,7 @@ if (ENABLE_UB_SANITIZER)
# Samples cases:
# load of value 4294967295, which is not a valid value for type 'const (anonymous namespace)::onnx::Field'
set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} -fsanitize=undefined -fno-sanitize=null -fno-sanitize=alignment -fno-sanitize=bool -fno-sanitize=enum")
if(OV_CPACK_COMPILER_IS_CLANG)
if(OV_COMPILER_IS_CLANG)
set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} -fno-sanitize=function")
endif()
@@ -70,7 +70,7 @@ if (DEFINED SANITIZER_COMPILER_FLAGS)
# ensure symbols are present
if (NOT WIN32)
set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} -g -fno-omit-frame-pointer")
if(NOT OV_CPACK_COMPILER_IS_CLANG)
if(NOT OV_COMPILER_IS_CLANG)
# GPU plugin tests compilation is slow with -fvar-tracking-assignments on GCC.
# Clang has no var-tracking-assignments.
set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} -fno-var-tracking-assignments")
@@ -78,7 +78,7 @@ if (DEFINED SANITIZER_COMPILER_FLAGS)
# prevent unloading libraries at runtime, so sanitizer can resolve their symbols
set(SANITIZER_LINKER_FLAGS "${SANITIZER_LINKER_FLAGS} -Wl,-z,nodelete")
if(OV_CPACK_COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
if(OV_COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
set(SANITIZER_LINKER_FLAGS "${SANITIZER_LINKER_FLAGS} -fuse-ld=lld")
endif()
else()
@@ -22,7 +22,7 @@ if(UNIX)
if (NOT ENABLE_SANITIZER)
set(IE_C_CXX_FLAGS "${IE_C_CXX_FLAGS} -s")
endif()
elseif(OV_CPACK_COMPILER_IS_CLANG)
elseif(OV_COMPILER_IS_CLANG)
set(IE_C_CXX_FLAGS "${IE_C_CXX_FLAGS} -fstack-protector-all")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if (NOT ENABLE_SANITIZER)
+1 -1
View File
@@ -56,7 +56,7 @@ ie_option (VERBOSE_BUILD "shows extra information about build" OFF)
ie_option (ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF)
ie_dependent_option (ENABLE_FUZZING "instrument build for fuzzing" OFF "OV_CPACK_COMPILER_IS_CLANG; NOT WIN32" OFF)
ie_dependent_option (ENABLE_FUZZING "instrument build for fuzzing" OFF "OV_COMPILER_IS_CLANG; NOT WIN32" OFF)
#
# Check features
+2 -2
View File
@@ -57,9 +57,9 @@ if(UNIX AND NOT APPLE)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
set(OV_CPACK_COMPILER_IS_CLANG ON)
set(OV_COMPILER_IS_CLANG ON)
else()
set(OV_CPACK_COMPILER_IS_CLANG OFF)
set(OV_COMPILER_IS_CLANG OFF)
endif()
get_property(OV_GENERATOR_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
@@ -26,7 +26,7 @@ elseif(SELECTIVE_BUILD STREQUAL "ON")
target_compile_definitions(${TARGET_NAME} INTERFACE SELECTIVE_BUILD)
if(CMAKE_COMPILER_IS_GNUCXX OR OV_CPACK_COMPILER_IS_CLANG)
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
# After disabling a block of code, some variables might be unused.
target_compile_options(${TARGET_NAME} INTERFACE
-Wno-unused-function
+1 -1
View File
@@ -605,7 +605,7 @@ if (ENABLE_OV_ONNX_FRONTEND)
target_compile_definitions(ov_core_unit_tests PRIVATE ENABLE_OV_ONNX_FRONTEND)
endif()
if (OV_CPACK_COMPILER_IS_CLANG)
if (OV_COMPILER_IS_CLANG)
target_compile_options(ov_core_unit_tests PRIVATE -Wno-undef -Wno-reserved-id-macro)
endif()
+1 -1
View File
@@ -37,7 +37,7 @@ ie_mark_target_as_cc(${TARGET_NAME})
if(SELECTIVE_BUILD STREQUAL "ON")
# After disabling a block of code, some variables might be unused.
if(CMAKE_COMPILER_IS_GNUCXX OR OV_CPACK_COMPILER_IS_CLANG)
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
target_compile_options(${TARGET_NAME} PRIVATE -Wno-unused-variable)
endif()
endif()
+1 -1
View File
@@ -115,7 +115,7 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND
if(ENABLE_SYSTEM_PROTOBUF)
set(link_type INTERFACE)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR OV_CPACK_COMPILER_IS_CLANG)
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
target_compile_options(${target} ${link_type} -Wno-undef)
endif()
endforeach()
+1 -1
View File
@@ -41,7 +41,7 @@ foreach(target IN LISTS gtest_targets)
set_target_properties(${target} PROPERTIES COMPILE_OPTIONS "${_target_cxx_flags}")
endif()
endif()
elseif(CMAKE_COMPILER_IS_GNUCXX OR OV_CPACK_COMPILER_IS_CLANG OR
elseif(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG OR
CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
target_compile_options(${target} PRIVATE -Wno-undef)
if(CMAKE_COMPILER_IS_GNUCXX)
+2 -2
View File
@@ -12,7 +12,7 @@ if(SUGGEST_OVERRIDE_SUPPORTED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override")
endif()
if(OV_CPACK_COMPILER_IS_CLANG)
if(OV_COMPILER_IS_CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override")
endif()
@@ -61,7 +61,7 @@ set(Protobuf_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/protobuf/src)
# to hide libprotobuf warnings
target_include_directories(libprotobuf-lite SYSTEM PRIVATE "${Protobuf_INCLUDE_DIRS}")
if(CMAKE_COMPILER_IS_GNUCXX OR OV_CPACK_COMPILER_IS_CLANG OR
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG OR
CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if(protobuf_BUILD_PROTOC_BINARIES)
list(APPEND _protoc_libs protoc libprotoc libprotobuf)