Properly enable CMAKE_COMPILE_WARNING_AS_ERROR (#19828)
* Properly enable CMAKE_COMPILE_WARNING_AS_ERROR_DEFAULT * Properly enable CMAKE_COMPILE_WARNING_AS_ERROR
This commit is contained in:
parent
18f29c02d2
commit
ba67db66ae
|
@ -33,6 +33,7 @@ macro(ov_disable_deprecated_warnings)
|
|||
endmacro()
|
||||
|
||||
macro(disable_deprecated_warnings)
|
||||
message(WARNING "disable_deprecated_warnings is deprecated, use ov_disable_deprecated_warnings instead")
|
||||
ov_disable_deprecated_warnings()
|
||||
endmacro()
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ else()
|
|||
ie_option(USE_BUILD_TYPE_SUBFOLDER "Create dedicated sub-folder per build type for output binaries" ON)
|
||||
endif()
|
||||
|
||||
if(CI_BUILD_NUMBER)
|
||||
if(DEFINED ENV{CI_BUILD_NUMBER} AND NOT (WIN32 OR CMAKE_CROSSCOMPILING))
|
||||
set(CMAKE_COMPILE_WARNING_AS_ERROR_DEFAULT ON)
|
||||
else()
|
||||
set(CMAKE_COMPILE_WARNING_AS_ERROR_DEFAULT OFF)
|
||||
|
|
|
@ -23,7 +23,7 @@ endif()
|
|||
|
||||
ie_dependent_option (ENABLE_INTEL_GPU "GPU OpenCL-based plugin for OpenVINO Runtime" ${ENABLE_INTEL_GPU_DEFAULT} "X86_64 OR AARCH64;NOT APPLE;NOT WINDOWS_STORE;NOT WINDOWS_PHONE" OFF)
|
||||
|
||||
if (ANDROID OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) OR NOT BUILD_SHARED_LIBS)
|
||||
if (ANDROID OR MINGW OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) OR NOT BUILD_SHARED_LIBS)
|
||||
# oneDNN doesn't support old compilers and android builds for now, so we'll build GPU plugin without oneDNN
|
||||
# also, in case of static build CPU's and GPU's oneDNNs will conflict, so we are disabling GPU's one in this case
|
||||
set(ENABLE_ONEDNN_FOR_GPU_DEFAULT OFF)
|
||||
|
|
|
@ -49,10 +49,8 @@ if(ENABLE_SAMPLES)
|
|||
set_and_check(gflags_DIR "@gflags_BINARY_DIR@")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
# Disable warning as error for private components
|
||||
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
|
||||
endif()
|
||||
# Disable warning as error for private components
|
||||
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
|
||||
|
||||
#
|
||||
# Content
|
||||
|
|
|
@ -54,10 +54,8 @@ if(ENABLE_SAMPLES)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
# Disable warning as error for private components
|
||||
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
|
||||
endif()
|
||||
# Disable warning as error for private components
|
||||
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
|
||||
|
||||
#
|
||||
# Content
|
||||
|
|
|
@ -20,7 +20,7 @@ enum class ShapeInferStatus {
|
|||
*/
|
||||
class IShapeInferSnippets {
|
||||
public:
|
||||
enum {DYNAMIC_DIMENSION = 0xffffffffffffffff};
|
||||
enum {DYNAMIC_DIMENSION = std::numeric_limits<size_t>::max()};
|
||||
struct Result {
|
||||
std::vector<VectorDims> dims;
|
||||
ShapeInferStatus status;
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
# ifndef NOMINMAX
|
||||
# define NOMINMAX
|
||||
# endif
|
||||
# include <Shlwapi.h>
|
||||
# include <direct.h>
|
||||
# include <shlwapi.h>
|
||||
# include <windows.h>
|
||||
/// @brief Max length of absolute file path
|
||||
# define MAX_ABS_PATH _MAX_PATH
|
||||
|
@ -325,6 +325,12 @@ void ov::util::convert_path_win_style(std::string& path) {
|
|||
}
|
||||
|
||||
#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT
|
||||
|
||||
# ifdef __APPLE__
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
# endif
|
||||
|
||||
std::string ov::util::wstring_to_string(const std::wstring& wstr) {
|
||||
# ifdef _WIN32
|
||||
int size_needed = WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), NULL, 0, NULL, NULL);
|
||||
|
@ -351,7 +357,12 @@ std::wstring ov::util::string_to_wstring(const std::string& string) {
|
|||
return result;
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
# ifdef __APPLE__
|
||||
# pragma clang diagnostic pop
|
||||
# endif
|
||||
|
||||
#endif // OPENVINO_ENABLE_UNICODE_PATH_SUPPORT
|
||||
|
||||
std::string ov::util::get_absolute_file_path(const std::string& path) {
|
||||
std::string absolutePath;
|
||||
|
|
|
@ -37,9 +37,7 @@ static const Xbyak::Operand::Code abi_save_gpr_regs[] = {
|
|||
static const Xbyak::Reg64 abi_param1(Xbyak::Operand::RCX), abi_param2(Xbyak::Operand::RDX),
|
||||
abi_param3(Xbyak::Operand::R8), abi_param4(Xbyak::Operand::R9), abi_not_param1(Xbyak::Operand::RDI);
|
||||
# else
|
||||
static const Xbyak::Reg64 abi_param1(Xbyak::Operand::RDI), abi_param2(Xbyak::Operand::RSI),
|
||||
abi_param3(Xbyak::Operand::RDX), abi_param4(Xbyak::Operand::RCX), abi_param5(Xbyak::Operand::R8),
|
||||
abi_param6(Xbyak::Operand::R9), abi_not_param1(Xbyak::Operand::RCX);
|
||||
static const Xbyak::Reg64 abi_param1(Xbyak::Operand::RDI);
|
||||
# endif
|
||||
# endif // XBYAK64
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ void CheckpointV1Reader::init_block(const std::shared_ptr<std::ifstream>& shard,
|
|||
"[TensorFlow Frontend] internal error: compression method for given block is not supported "
|
||||
"for checkpoint file " +
|
||||
shard_name);
|
||||
result_data = std::string(buf.get(), size);
|
||||
block = std::string(buf.data(), size);
|
||||
#else
|
||||
FRONT_END_GENERAL_CHECK(buf[size] == 0 || buf[size] == 1,
|
||||
"[TensorFlow Frontend] internal error: compression method for given block is not supported "
|
||||
|
|
|
@ -18,6 +18,11 @@
|
|||
#include "openvino/runtime/so_ptr.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
|
||||
#ifdef __GNUC__
|
||||
// on RHEL 8.2 deprecation inside the macro does not work
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
#endif
|
||||
|
||||
#define OV_INFER_REQ_CALL_STATEMENT(...) \
|
||||
OPENVINO_ASSERT(_impl != nullptr, "InferRequest was not initialized."); \
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START \
|
||||
|
|
|
@ -35,7 +35,7 @@ set(OV_CPU_ARM_TARGET_ARCH ${OV_CPU_ARM_TARGET_ARCH_DEFAULT})
|
|||
|
||||
if(X86 OR X86_64 OR AARCH64)
|
||||
# disable mlas with webassembly
|
||||
if(EMSCRIPTEN OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7))
|
||||
if(EMSCRIPTEN OR MINGW OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7))
|
||||
set(ENABLE_MLAS_FOR_CPU_DEFAULT OFF)
|
||||
else()
|
||||
set(ENABLE_MLAS_FOR_CPU_DEFAULT ON)
|
||||
|
|
2
src/plugins/intel_cpu/thirdparty/onednn
vendored
2
src/plugins/intel_cpu/thirdparty/onednn
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 3110963434d8662e93b3cdafc9bf6b41235aa602
|
||||
Subproject commit 31c8555b923e16b4ddfdcd1d1f126c115b5e0da7
|
|
@ -44,7 +44,7 @@ protected:
|
|||
ExtractorsManager m_manager = ExtractorsManager();
|
||||
static std::shared_ptr<GraphCache> m_cache_instance;
|
||||
// cache byte size
|
||||
size_t m_graph_cache_bytesize = 0;
|
||||
uint64_t m_graph_cache_bytesize = 0;
|
||||
|
||||
GraphCache() {
|
||||
ExtractorsManager::ExtractorsMap matchers = {
|
||||
|
|
|
@ -127,7 +127,7 @@ extern fnPQclear PQclear;
|
|||
extern fnPQresultErrorMessage PQresultErrorMessage;
|
||||
#endif
|
||||
|
||||
extern char* PGPrefix(const char* text, ::testing::internal::GTestColor color);
|
||||
extern const char* PGPrefix(const char* text, ::testing::internal::GTestColor color);
|
||||
|
||||
#define PG_ERR PGPrefix("[ PG ERROR ] ", ::testing::internal::COLOR_RED)
|
||||
#define PG_WRN PGPrefix("[ PG WARN ] ", ::testing::internal::COLOR_YELLOW)
|
||||
|
|
|
@ -26,8 +26,15 @@ fnPQgetisnull PQgetisnull;
|
|||
fnPQclear PQclear;
|
||||
fnPQresultErrorMessage PQresultErrorMessage;
|
||||
|
||||
char* PGPrefix(const char* text, ::testing::internal::GTestColor color) {
|
||||
const char* PGPrefix(const char* text, ::testing::internal::GTestColor color) {
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
||||
#endif
|
||||
::testing::internal::ColoredPrintf(color, text);
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,9 @@ find_package(IEDevScripts REQUIRED
|
|||
NO_CMAKE_FIND_ROOT_PATH
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# TODO: remove this when all the deprecated functions are removed
|
||||
ov_deprecated_no_errors()
|
||||
|
||||
find_package(OpenVINO REQUIRED)
|
||||
|
||||
if (NOT ENABLE_FUZZING)
|
||||
|
|
6
thirdparty/zlib/CMakeLists.txt
vendored
6
thirdparty/zlib/CMakeLists.txt
vendored
|
@ -14,7 +14,11 @@ else()
|
|||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -diag-disable=266")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-non-prototype")
|
||||
include(CheckCCompilerFlag)
|
||||
check_c_compiler_flag("-Wdeprecated-non-prototype" DEPRECATED_NO_PROTOTYPE)
|
||||
if(DEPRECATED_NO_PROTOTYPE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-non-prototype")
|
||||
endif()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue
Block a user