diff --git a/cmake/developer_package/compile_flags/os_flags.cmake b/cmake/developer_package/compile_flags/os_flags.cmake index 17620c6d6348eb..4ee3b7d7d09600 100644 --- a/cmake/developer_package/compile_flags/os_flags.cmake +++ b/cmake/developer_package/compile_flags/os_flags.cmake @@ -390,13 +390,7 @@ endif() # to allows to override CMAKE_CXX_STANDARD from command line if(NOT DEFINED CMAKE_CXX_STANDARD) - if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set(CMAKE_CXX_STANDARD 14) - elseif(OV_COMPILER_IS_INTEL_LLVM) - set(CMAKE_CXX_STANDARD 17) - else() - set(CMAKE_CXX_STANDARD 11) - endif() + set(CMAKE_CXX_STANDARD 17) endif() if(NOT DEFINED CMAKE_CXX_EXTENSIONS) diff --git a/docs/snippets/CMakeLists.txt b/docs/snippets/CMakeLists.txt index 18d176212a0212..7576b96995ff78 100644 --- a/docs/snippets/CMakeLists.txt +++ b/docs/snippets/CMakeLists.txt @@ -107,7 +107,7 @@ endif() set(TARGET_NAME "ov_integration_snippet") # [cmake:integration_example_cpp] cmake_minimum_required(VERSION 3.10) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) find_package(OpenVINO REQUIRED) @@ -120,7 +120,7 @@ target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime) set(TARGET_NAME_PY "ov_integration_snippet_py") # [cmake:integration_example_cpp_py] cmake_minimum_required(VERSION 3.10) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) if(NOT CMAKE_CROSSCOMPILING) find_package(Python3 QUIET COMPONENTS Interpreter) @@ -143,7 +143,7 @@ target_link_libraries(${TARGET_NAME_PY} PRIVATE openvino::runtime) set(TARGET_NAME_C "ov_integration_snippet_c") # [cmake:integration_example_c] cmake_minimum_required(VERSION 3.10) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) find_package(OpenVINO REQUIRED) diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt index c3a01fe41f8957..939ddc9f0c08b2 100644 --- a/samples/cpp/CMakeLists.txt +++ b/samples/cpp/CMakeLists.txt @@ -95,7 +95,7 @@ endif() #################################### ## to use C++11; can overwritten via cmake command line if(NOT DEFINED CMAKE_CXX_STANDARD) - set (CMAKE_CXX_STANDARD 11) + set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_EXTENSIONS OFF) set (CMAKE_CXX_STANDARD_REQUIRED ON) endif() diff --git a/src/cmake/openvino.cmake b/src/cmake/openvino.cmake index affaaed44226a0..ccd3c3b8d69423 100644 --- a/src/cmake/openvino.cmake +++ b/src/cmake/openvino.cmake @@ -30,7 +30,7 @@ add_library(${TARGET_NAME} add_library(openvino::runtime ALIAS ${TARGET_NAME}) set_target_properties(${TARGET_NAME} PROPERTIES EXPORT_NAME runtime) -target_compile_features(${TARGET_NAME} PUBLIC cxx_std_11) +target_compile_features(${TARGET_NAME} PUBLIC cxx_std_17) ov_add_vs_version_file(NAME ${TARGET_NAME} FILEDESCRIPTION "OpenVINO runtime library") diff --git a/src/core/template_extension/CMakeLists.txt b/src/core/template_extension/CMakeLists.txt index 3cfcfcd058ff94..fb2e2bc8f10be2 100644 --- a/src/core/template_extension/CMakeLists.txt +++ b/src/core/template_extension/CMakeLists.txt @@ -3,7 +3,7 @@ # # [cmake:extension] -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) set(TARGET_NAME "openvino_template_extension") diff --git a/src/plugins/intel_cpu/CMakeLists.txt b/src/plugins/intel_cpu/CMakeLists.txt index d4729d79bf6925..2eebfe88a2c803 100644 --- a/src/plugins/intel_cpu/CMakeLists.txt +++ b/src/plugins/intel_cpu/CMakeLists.txt @@ -175,10 +175,6 @@ if(DNNL_USE_ACL) set(OV_CPU_WITH_ACL ON) endif() -if(OV_CPU_WITH_ACL) - set(CMAKE_CXX_STANDARD 14) -endif() - if (ENABLE_SHL_FOR_CPU) add_definitions(-DOV_CPU_WITH_SHL) set(OV_CPU_WITH_SHL ON) diff --git a/tests/memory_tests/CMakeLists.txt b/tests/memory_tests/CMakeLists.txt index c2e209c0f5b9a7..7aac21c2f9e5e4 100644 --- a/tests/memory_tests/CMakeLists.txt +++ b/tests/memory_tests/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13) -set (CMAKE_CXX_STANDARD 11) +set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_EXTENSIONS OFF) set (CMAKE_CXX_STANDARD_REQUIRED ON) if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") diff --git a/tests/stress_tests/CMakeLists.txt b/tests/stress_tests/CMakeLists.txt index 1c6cd573b3cf5d..49652ca02f7c3e 100644 --- a/tests/stress_tests/CMakeLists.txt +++ b/tests/stress_tests/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13) -set (CMAKE_CXX_STANDARD 11) +set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_EXTENSIONS OFF) set (CMAKE_CXX_STANDARD_REQUIRED ON) if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") diff --git a/tests/time_tests/CMakeLists.txt b/tests/time_tests/CMakeLists.txt index 7bacdc94237aa5..7150c0e5f04c22 100644 --- a/tests/time_tests/CMakeLists.txt +++ b/tests/time_tests/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13) -set (CMAKE_CXX_STANDARD 11) +set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_EXTENSIONS OFF) set (CMAKE_CXX_STANDARD_REQUIRED ON) if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") diff --git a/thirdparty/dependencies.cmake b/thirdparty/dependencies.cmake index 51c9c63c971f05..9bfc6db795b12d 100644 --- a/thirdparty/dependencies.cmake +++ b/thirdparty/dependencies.cmake @@ -474,7 +474,6 @@ if(ENABLE_SNAPPY_COMPRESSION) set(SNAPPY_BUILD_BENCHMARKS OFF) set(SNAPPY_BUILD_TESTS OFF) set(INSTALL_GTEST OFF) - set(CMAKE_CXX_STANDARD 14) if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # '<': signed/unsigned mismatch ov_add_compiler_flags(/wd4018)