diff --git a/.ci/azure/linux_debian.yml b/.ci/azure/linux_debian.yml index f05f5c4596e..257e1139b85 100644 --- a/.ci/azure/linux_debian.yml +++ b/.ci/azure/linux_debian.yml @@ -109,7 +109,7 @@ jobs: - script: | set -e sudo -E $(REPO_DIR)/install_build_dependencies.sh - # 'clang' compiler is to check that samples can be built using it + # 'clang' is used as a default compiler sudo apt --assume-yes install clang sudo apt --assume-yes install --no-install-recommends libopencv-imgproc-dev libopencv-imgcodecs-dev # For opencv-python: python3-setuptools and pip upgrade @@ -165,6 +165,8 @@ jobs: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_LINKER_LAUNCHER=ccache -DCMAKE_C_LINKER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER=clang++ + -DCMAKE_C_COMPILER=clang -DCPACK_GENERATOR=DEB -S $(REPO_DIR) -B $(BUILD_DIR) @@ -285,12 +287,6 @@ jobs: - script: $(SAMPLES_INSTALL_DIR)/cpp/build_samples.sh -i $(INSTALL_DIR) displayName: 'Build cpp samples' - - script: $(SAMPLES_INSTALL_DIR)/cpp/build_samples.sh -i $(INSTALL_DIR) - env: - CC: clang - CXX: clang++ - displayName: 'Build cpp samples - clang' - - script: $(SAMPLES_INSTALL_DIR)/c/build_samples.sh -i $(INSTALL_DIR) displayName: 'Build c samples' diff --git a/.ci/azure/mac.yml b/.ci/azure/mac.yml index 6e74f12becf..58c21a5dc68 100644 --- a/.ci/azure/mac.yml +++ b/.ci/azure/mac.yml @@ -143,9 +143,6 @@ jobs: -DBUILD_nvidia_plugin=OFF \ -S $(REPO_DIR) \ -B $(BUILD_DIR) - env: - CC: gcc - CXX: g++ displayName: 'CMake OpenVINO' - script: ls -alR $(REPO_DIR)/temp/ diff --git a/cmake/developer_package/compile_flags/os_flags.cmake b/cmake/developer_package/compile_flags/os_flags.cmake index 43a46adc170..3162f323f48 100644 --- a/cmake/developer_package/compile_flags/os_flags.cmake +++ b/cmake/developer_package/compile_flags/os_flags.cmake @@ -412,11 +412,6 @@ else() # Warn if an undefined identifier is evaluated in an #if directive. Such identifiers are replaced with zero. ie_add_compiler_flags(-Wundef) - check_cxx_compiler_flag("-Wsuggest-override" SUGGEST_OVERRIDE_SUPPORTED) - if(SUGGEST_OVERRIDE_SUPPORTED) - set(CMAKE_CXX_FLAGS "-Wsuggest-override ${CMAKE_CXX_FLAGS}") - endif() - # # Warnings as errors # @@ -468,6 +463,13 @@ if(OV_COMPILER_IS_CLANG) ie_add_compiler_flags(-Wno-delete-non-abstract-non-virtual-dtor) endif() +check_cxx_compiler_flag("-Wsuggest-override" SUGGEST_OVERRIDE_SUPPORTED) +if(SUGGEST_OVERRIDE_SUPPORTED) + set(CMAKE_CXX_FLAGS "-Wsuggest-override ${CMAKE_CXX_FLAGS}") +endif() + +check_cxx_compiler_flag("-Wunused-but-set-variable" UNUSED_BUT_SET_VARIABLE_SUPPORTED) + # # link_system_libraries(target ) # diff --git a/docs/snippets/CMakeLists.txt b/docs/snippets/CMakeLists.txt index 8ebfde3b23d..006870d71ca 100644 --- a/docs/snippets/CMakeLists.txt +++ b/docs/snippets/CMakeLists.txt @@ -10,9 +10,9 @@ endif() if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) ie_add_compiler_flags(-Wno-unused-variable) - if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0) - ie_add_compiler_flags(-Wno-unused-variable -Wno-unused-but-set-variable) - endif() +endif() +if(UNUSED_BUT_SET_VARIABLE_SUPPORTED) + ie_add_compiler_flags(-Wno-unused-but-set-variable) endif() file(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt index cea9d213b11..72bfa5cfd34 100644 --- a/samples/cpp/CMakeLists.txt +++ b/samples/cpp/CMakeLists.txt @@ -69,7 +69,13 @@ if(APPLE) set(CMAKE_MACOSX_RPATH ON) endif() -if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)" AND NOT (CMAKE_CROSSCOMPILING OR CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")) +if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64.*|aarch64.*|AARCH64.*)") + set(AARCH64 ON) +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)") + set(ARM ON) +endif() + +if(ARM AND NOT (CMAKE_CROSSCOMPILING OR CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")) add_compile_options(-march=armv7-a+fp) endif() diff --git a/src/bindings/python/src/compatibility/openvino/inference_engine/CMakeLists.txt b/src/bindings/python/src/compatibility/openvino/inference_engine/CMakeLists.txt index 0fee9ab2637..7c503d6070f 100644 --- a/src/bindings/python/src/compatibility/openvino/inference_engine/CMakeLists.txt +++ b/src/bindings/python/src/compatibility/openvino/inference_engine/CMakeLists.txt @@ -21,7 +21,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # 'argument': conversion from 'size_t' to 'int', possible loss of data ie_add_compiler_flags(/wd4267) ie_add_compiler_flags(/wd4244) -elseif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0) +endif() +if(UNUSED_BUT_SET_VARIABLE_SUPPORTED) ie_add_compiler_flags(-Wno-unused-but-set-variable) endif() diff --git a/src/common/conditional_compilation/CMakeLists.txt b/src/common/conditional_compilation/CMakeLists.txt index 2c0dbacae69..2d899b01c54 100644 --- a/src/common/conditional_compilation/CMakeLists.txt +++ b/src/common/conditional_compilation/CMakeLists.txt @@ -33,9 +33,9 @@ elseif(SELECTIVE_BUILD STREQUAL "ON") -Wno-unused-variable -Wno-unused-parameter -Wno-unused-local-typedefs) - if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0) - target_compile_options(${TARGET_NAME} INTERFACE -Wno-unused-but-set-variable) - endif() + endif() + if(UNUSED_BUT_SET_VARIABLE_SUPPORTED) + target_compile_options(${TARGET_NAME} INTERFACE -Wno-unused-but-set-variable) endif() set(GENERATED_HEADER ${CMAKE_CURRENT_BINARY_DIR}/conditional_compilation_gen.h CACHE FILEPATH "") diff --git a/src/frontends/tensorflow_common/include/helper_ops/fifo_queue.hpp b/src/frontends/tensorflow_common/include/helper_ops/fifo_queue.hpp index 0a2fe8cbe50..3729b72f522 100644 --- a/src/frontends/tensorflow_common/include/helper_ops/fifo_queue.hpp +++ b/src/frontends/tensorflow_common/include/helper_ops/fifo_queue.hpp @@ -26,7 +26,6 @@ public: : InternalOperation(decoder, OutputVector{}, 1), m_component_types(component_types), m_shapes(shapes), - m_capacity(capacity), m_container(container), m_shared_name(shared_name) { validate_and_infer_types(); @@ -47,7 +46,6 @@ public: private: std::vector m_component_types; std::vector m_shapes; - int64_t m_capacity; std::string m_container; std::string m_shared_name; }; diff --git a/src/plugins/intel_gna/src/common/gna_target.cpp b/src/plugins/intel_gna/src/common/gna_target.cpp index 9e602aef2ed..df2f117b8d2 100644 --- a/src/plugins/intel_gna/src/common/gna_target.cpp +++ b/src/plugins/intel_gna/src/common/gna_target.cpp @@ -22,7 +22,6 @@ static constexpr const char* kGnaTarget3_0 = "GNA_TARGET_3_0"; static constexpr const char* kGnaTarget3_1 = "GNA_TARGET_3_1"; static constexpr const char* kGnaTarget3_5 = "GNA_TARGET_3_5"; static constexpr const char* kGnaTarget3_5_e = "GNA_TARGET_3_5_E"; -static constexpr const char* kGnaDefaultTarget = kGnaTarget3_0; static const std::unordered_map HWGenerationDeviceMap{ {HWGeneration::GNA_2_0, DeviceVersion::GNA2_0}, diff --git a/src/plugins/intel_gpu/src/kernel_selector/kernels/range/range_kernel_ref.cpp b/src/plugins/intel_gpu/src/kernel_selector/kernels/range/range_kernel_ref.cpp index d7fe2c41226..d781427611e 100644 --- a/src/plugins/intel_gpu/src/kernel_selector/kernels/range/range_kernel_ref.cpp +++ b/src/plugins/intel_gpu/src/kernel_selector/kernels/range/range_kernel_ref.cpp @@ -34,7 +34,7 @@ KernelsData RangeKernelRef::GetKernelsData(const Params ¶ms, const optional_ auto jit_constants = MakeBaseParamsJitConstants(prim_params); auto jit = CreateJit(kernelName, jit_constants, entry_point); - kernel_data.update_dispatch_data_func = [this](const Params& params, KernelData& kd) { + kernel_data.update_dispatch_data_func = [](const Params& params, KernelData& kd) { const auto& prim_params = static_cast(params); auto dispatchData = SetDefault(prim_params); OPENVINO_ASSERT(kd.kernels.size() == 1, "[GPU] Invalid kernels size for update dispatch data func"); diff --git a/src/plugins/intel_gpu/tests/test_cases/proposal_cpu_test.cpp b/src/plugins/intel_gpu/tests/test_cases/proposal_cpu_test.cpp index ae9a1df978d..5ead5708e8d 100644 --- a/src/plugins/intel_gpu/tests/test_cases/proposal_cpu_test.cpp +++ b/src/plugins/intel_gpu/tests/test_cases/proposal_cpu_test.cpp @@ -20,7 +20,6 @@ extern size_t bbox_pred_data_size; extern float proposal_ref[]; extern size_t proposal_ref_size; -const float epsilon = 0.00025f; const float epsilon_fp16 = 0.125f; // !!!!!!!! diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 0f8480f262c..2870bb74d21 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -254,7 +254,7 @@ if(ENABLE_GAPI_PREPROCESSING) if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11) target_compile_options(fluid PRIVATE "-Wno-maybe-uninitialized") endif() - if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0) + if(UNUSED_BUT_SET_VARIABLE_SUPPORTED) target_compile_options(fluid PRIVATE "-Wno-unused-but-set-variable") endif()