OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[CMAKE] Update cmake minimum version 3.26 (#36731)
Mikhail Ryzhove9d771fa88ba
diff --git a/.github/dockerfiles/docker_tag b/.github/dockerfiles/docker_tagindex b652f0f3c34..f1aa58330e6 100644--- a/.github/dockerfiles/docker_tag+++ b/.github/dockerfiles/docker_tag@@ -1 +1 @@-pr-36466+pr-36731diff --git a/.github/dockerfiles/ov_build/manylinux_2_28/Dockerfile b/.github/dockerfiles/ov_build/manylinux_2_28/Dockerfileindex 10fb23da87b..303196adac5 100644--- a/.github/dockerfiles/ov_build/manylinux_2_28/Dockerfile+++ b/.github/dockerfiles/ov_build/manylinux_2_28/Dockerfile@@ -23,4 +23,4 @@ RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \ENV PATH="/opt/python/cp311-cp311/bin:$SCCACHE_HOME:$PATH"# Install newer ninja (yum ships older version lacking --quiet)-RUN python3 -m pip install --no-cache-dir ninja==1.13.0+RUN python3 -m pip install --no-cache-dir cmake==3.26.4 ninja==1.13.0diff --git a/.github/dockerfiles/ov_build/ubuntu_22_04_android/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_22_04_android/Dockerfileindex 604b00a275c..3a926ec29a4 100644--- a/.github/dockerfiles/ov_build/ubuntu_22_04_android/Dockerfile+++ b/.github/dockerfiles/ov_build/ubuntu_22_04_android/Dockerfile@@ -26,9 +26,9 @@ RUN apt update && \ninja-build \build-essential \python3-pip && \- # vcpkg requires cmake 3.19 or later+ # OpenVINO build requires cmake 3.26 or later# ninja>=1.11 needed for --quiet support (apt ships 1.10.1 on 22.04)- python3 -m pip install -U pip cmake~=3.28.0 ninja==1.13.0 && \+ python3 -m pip install -U pip cmake==3.26.4 ninja==1.13.0 && \# vcpkg's tool dependenciesapt install curl zip unzip tar && \# vcpkg 'python3' port dependenciesdiff --git a/.github/dockerfiles/ov_build/ubuntu_22_04_riscv/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_22_04_riscv/Dockerfileindex bdc502f2756..15ce51ed798 100644--- a/.github/dockerfiles/ov_build/ubuntu_22_04_riscv/Dockerfile+++ b/.github/dockerfiles/ov_build/ubuntu_22_04_riscv/Dockerfile@@ -92,5 +92,5 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \rm -f get-pip.py# Install newer ninja (apt ships 1.10.1 on 22.04 which lacks --quiet)-RUN python3 -m pip install --no-cache-dir ninja==1.13.0+RUN python3 -m pip install --no-cache-dir cmake==3.26.4 ninja==1.13.0diff --git a/.github/dockerfiles/ov_build/webassembly/Dockerfile b/.github/dockerfiles/ov_build/webassembly/Dockerfileindex 1299c4956a1..70f8684c408 100644--- a/.github/dockerfiles/ov_build/webassembly/Dockerfile+++ b/.github/dockerfiles/ov_build/webassembly/Dockerfile@@ -24,6 +24,9 @@ RUN apt-get update && \ca-certificates && \rm -rf /var/lib/apt/lists/*+# Emscripten base image has CMake 3.22.x; OpenVINO now requires >=3.26.+RUN python3 -m pip install --no-cache-dir cmake==3.26.4+# Install sscacheARG SCCACHE_VERSION="v0.7.5"ENV SCCACHE_HOME="/opt/sccache" \diff --git a/.github/dockerfiles/ov_test/ubuntu_22_04_x64_code_style/Dockerfile b/.github/dockerfiles/ov_test/ubuntu_22_04_x64_code_style/Dockerfileindex 75e0db733a2..2946f35452f 100644--- a/.github/dockerfiles/ov_test/ubuntu_22_04_x64_code_style/Dockerfile+++ b/.github/dockerfiles/ov_test/ubuntu_22_04_x64_code_style/Dockerfile@@ -23,7 +23,6 @@ RUN apt-get update && \curl \git \ca-certificates \- cmake \wget \build-essential \shellcheck \@@ -36,3 +35,8 @@ ENV PIP_VERSION="24.0"RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \rm -f get-pip.py++# Install CMake 3.26.4 using the Kitware installer script+RUN wget https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-x86_64.sh && \+ sh cmake-3.26.4-linux-x86_64.sh --skip-license --prefix=/usr/local && \+ rm cmake-3.26.4-linux-x86_64.shdiff --git a/.github/dockerfiles/ov_test/ubuntu_24_04_x64_code_style/Dockerfile b/.github/dockerfiles/ov_test/ubuntu_24_04_x64_code_style/Dockerfileindex 4a186fc747b..c0abc638500 100644--- a/.github/dockerfiles/ov_test/ubuntu_24_04_x64_code_style/Dockerfile+++ b/.github/dockerfiles/ov_test/ubuntu_24_04_x64_code_style/Dockerfile@@ -24,7 +24,6 @@ RUN apt-get update && \git \ca-certificates \wget \- cmake \lsb-release \gnupg \build-essential \@@ -39,3 +38,8 @@ RUN apt-get update && \./llvm.sh 18 && \apt-get --assume-yes install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu scons gcc-riscv64-linux-gnu g++-riscv64-linux-gnu binutils-riscv64-linux-gnu && \rm -rf /var/lib/apt/lists/*++# Install CMake 3.26.4 using the Kitware installer script+RUN wget https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-x86_64.sh && \+ sh cmake-3.26.4-linux-x86_64.sh --skip-license --prefix=/usr/local && \+ rm cmake-3.26.4-linux-x86_64.shdiff --git a/.github/workflows/webassembly.yml b/.github/workflows/webassembly.ymlindex 2ec4ea88c0e..c71a74678cd 100644--- a/.github/workflows/webassembly.yml+++ b/.github/workflows/webassembly.yml@@ -139,8 +139,8 @@ jobs:-S ${OPENVINO_REPO} \-B ${OPENVINO_BUILD_DIR}- - name: emmake make - build- run: emmake make -j$(nproc) hello_query_device -C ${OPENVINO_BUILD_DIR}+ - name: cmake --build - build+ run: cmake --build ${OPENVINO_BUILD_DIR} --target hello_query_device --parallel $(nproc)- name: Show ccache statsrun: ${SCCACHE_PATH} --show-statsdiff --git a/CMakeLists.txt b/CMakeLists.txtindex 8d234c44aef..0eb92bae147 100644--- a/CMakeLists.txt+++ b/CMakeLists.txt@@ -2,13 +2,8 @@# SPDX-License-Identifier: Apache-2.0#-if(CPACK_GENERATOR STREQUAL "DEB")- # we have to use CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS variable- cmake_minimum_required(VERSION 3.20)-else()- # 3.18: default choice as minimum version for onnx 1.18- cmake_minimum_required(VERSION 3.18)-endif()+# 3.26 is required by the bundled ONNX version.+cmake_minimum_required(VERSION 3.26)if(POLICY CMP0091)cmake_policy(SET CMP0091 NEW) # Enables use of MSVC_RUNTIME_LIBRARYdiff --git a/docs/articles_en/about-openvino/release-notes-openvino/system-requirements.rst b/docs/articles_en/about-openvino/release-notes-openvino/system-requirements.rstindex 94fe766067f..67d78e8edb1 100644--- a/docs/articles_en/about-openvino/release-notes-openvino/system-requirements.rst+++ b/docs/articles_en/about-openvino/release-notes-openvino/system-requirements.rst@@ -119,7 +119,7 @@ Operating systems and developer environment* GNU Compiler Collection and CMake are needed for building from source:* `GNU Compiler Collection (GCC) <https://www.gnu.org/software/gcc/>`__ 7.5 and above- * `CMake <https://cmake.org/download/>`__ 3.13 or higher+ * `CMake <https://cmake.org/download/>`__ 3.26 or higherHigher versions of kernel might be required for 10th Gen Intel® Core™ Processors and above,Intel® Core™ Ultra Processors, 4th Gen Intel® Xeon® Scalable Processors and above@@ -135,7 +135,7 @@ Operating systems and developer environmentBuild environment components:* `Microsoft Visual Studio 2019 or later <https://visualstudio.microsoft.com/downloads/>`__- * `CMake <https://cmake.org/download/>`__ 3.16 or higher+ * `CMake <https://cmake.org/download/>`__ 3.26 or higher* `Python <https://www.python.org/downloads/>`__ 3.10-3.14* `Intel® HD Graphics Driver <https://downloadcenter.intel.com/product/80939/Graphics-Drivers>`__required for inference on GPU@@ -147,7 +147,7 @@ Operating systems and developer environmentBuild environment components:* `Xcode <https://developer.apple.com/xcode/>`__ 10.3- * `CMake <https://cmake.org/download/>`__ 3.13 or higher+ * `CMake <https://cmake.org/download/>`__ 3.26 or higher* `Python <https://www.python.org/downloads/>`__ 3.10-3.14.. tab-item:: DL framework versions:@@ -185,7 +185,7 @@ to learn more about the release types... tab-item:: Linux:name: archive-lnx-sysreq- * `CMake 3.13 or higher, 64-bit <https://cmake.org/download/>`__+ * `CMake 3.26 or higher, 64-bit <https://cmake.org/download/>`__* `Python 3.10 - 3.14, 64-bit <https://www.python.org/downloads/>`__* GCC:@@ -225,7 +225,7 @@ to learn more about the release types... tab-item:: macOS:name: archive-mac-sysreq- * `CMake 3.13 or higher <https://cmake.org/download/>`__ (choose "macOS 10.13 or later"). Add ``/Applications/CMake.app/Contents/bin`` to path (for default install).+ * `CMake 3.26 or higher <https://cmake.org/download/>`__ (choose "macOS 10.13 or later"). Add ``/Applications/CMake.app/Contents/bin`` to path (for default install).* `Python 3.10 - 3.14 <https://www.python.org/downloads/mac-osx/>`__ (choose 3.10 - 3.14). Install and add to path.* Apple Xcode Command Line Tools. In the terminal, run ``xcode-select --install`` from any directory* (Optional) Apple Xcode IDE (not required for OpenVINO™, but useful for development)@@ -235,7 +235,7 @@ to learn more about the release types.* `C++ libraries (included in Visual Studio redistributable) <https://aka.ms/vs/17/release/vc_redist.x64.exe>`__ (a core dependency for OpenVINO Runtime)* `Microsoft Visual Studio 2019 or later <http://visualstudio.microsoft.com/downloads/>`__ (for development and app compilation with OpenVINO)- * `CMake 3.14 or higher, 64-bit <https://cmake.org/download/>`__ (optional, only required for building sample applications)+ * `CMake 3.26 or higher, 64-bit <https://cmake.org/download/>`__ (optional, only required for building sample applications)* `Python 3.10 - 3.14, 64-bit <https://www.python.org/downloads/windows/>`__.. note::@@ -259,7 +259,7 @@ to learn more about the release types... tab-item:: Linux:sync: linux- * `CMake 3.13 or higher, 64-bit <https://cmake.org/download/>`__+ * `CMake 3.26 or higher, 64-bit <https://cmake.org/download/>`__* GCC 9.3.0 (for Ubuntu 20.04), GCC 11.3.0 (for Ubuntu 22.04) or GCC 13.2.0 (for Ubuntu 24.04)* `Python 3.10 - 3.14, 64-bit <https://www.python.org/downloads/>`__@@ -272,7 +272,7 @@ to learn more about the release types.:sync: linux* `Homebrew <https://brew.sh/>`_- * `CMake 3.13 or higher, 64-bit <https://cmake.org/download/>`__+ * `CMake 3.26 or higher, 64-bit <https://cmake.org/download/>`__* GCC 9.3.0 (for Ubuntu 20.04), GCC 11.3.0 (for Ubuntu 22.04) or GCC 13.2.0 (for Ubuntu 24.04)* `Python 3.10 - 3.14, 64-bit <https://www.python.org/downloads/>`__@@ -280,7 +280,7 @@ to learn more about the release types.:sync: macos* `Homebrew <https://brew.sh/>`_- * `CMake 3.13 or higher <https://cmake.org/download/>`__ (choose "macOS 10.13 or later"). Add ``/Applications/CMake.app/Contents/bin`` to path (for default installation).+ * `CMake 3.26 or higher <https://cmake.org/download/>`__ (choose "macOS 10.13 or later"). Add ``/Applications/CMake.app/Contents/bin`` to path (for default installation).* `Python 3.10 - 3.14 <https://www.python.org/downloads/mac-osx/>`__ . Install and add it to path.* Apple Xcode Command Line Tools. In the terminal, run ``xcode-select --install`` from any directory to install it.* (Optional) Apple Xcode IDE (not required for OpenVINO™, but useful for development)@@ -333,7 +333,7 @@ to learn more about the release types.Software:- * `CMake 3.13 or higher, 64-bit <https://cmake.org/download/>`_+ * `CMake 3.26 or higher, 64-bit <https://cmake.org/download/>`_* GCC 8.4.1* `Python 3.10 - 3.14, 64-bit <https://www.python.org/downloads/>`_@@ -349,7 +349,7 @@ to learn more about the release types.Software:- * `CMake 3.13 or higher, 64-bit <https://cmake.org/download/>`_+ * `CMake 3.26 or higher, 64-bit <https://cmake.org/download/>`_* GCC 8.2.0* `Python 3.10 - 3.14, 64-bit <https://www.python.org/downloads/>`_diff --git a/docs/articles_en/get-started/learn-openvino/openvino-samples/get-started-demos.rst b/docs/articles_en/get-started/learn-openvino/openvino-samples/get-started-demos.rstindex 32dde2fd2a3..3827ff00121 100644--- a/docs/articles_en/get-started/learn-openvino/openvino-samples/get-started-demos.rst+++ b/docs/articles_en/get-started/learn-openvino/openvino-samples/get-started-demos.rst@@ -135,7 +135,7 @@ Instructions below show how to build sample applications with CMake. If you are.. note::- If you want to use Microsoft Visual Studio 2019, you are required to install CMake 3.14 or higher.+ If you want to use Microsoft Visual Studio 2019, you are required to install CMake 3.26 or higher.You can build the C or C++ sample applications on Windows with either PowerShell or Command Prompt.diff --git a/docs/dev/build_android.md b/docs/dev/build_android.mdindex 9ecc8b69128..d495658db21 100644--- a/docs/dev/build_android.md+++ b/docs/dev/build_android.md@@ -4,7 +4,7 @@ This article describes how to build OpenVINO for Android operating systems.## Software requirements-- [CMake](https://cmake.org/download/) 3.13 or higher+- [CMake](https://cmake.org/download/) 3.26 or higher- [SCons](https://scons.org/pages/download.html) 4.6.0 or higher- [Android SDK Platform Tools](https://developer.android.com/tools/releases/platform-tools) (this guide has been validated with the 35.0.0 release)- [Android NDK](https://developer.android.com/ndk/downloads) (this guide has been validated with r28c release)diff --git a/docs/dev/build_linux.md b/docs/dev/build_linux.mdindex 09afc6fbcfa..ef45212990a 100644--- a/docs/dev/build_linux.md+++ b/docs/dev/build_linux.md@@ -9,7 +9,7 @@ The software was validated on:## Software requirements-- [CMake](https://cmake.org/download/) 3.13 or higher+- [CMake](https://cmake.org/download/) 3.26 or higher- GCC 7.5 or higher to build OpenVINO Runtime- Python 3.9 - 3.12 for OpenVINO Runtime Python API- (Optional) Install Intel® Graphics Compute Runtime for OpenCL™ Driver package to enable inference on Intel integrated GPUs.diff --git a/docs/dev/build_mac_arm.md b/docs/dev/build_mac_arm.mdindex 7511dd81739..4879412a314 100644--- a/docs/dev/build_mac_arm.md+++ b/docs/dev/build_mac_arm.md@@ -27,7 +27,7 @@ The software was validated on:```sh% xcode-select --install```-- [CMake](https://cmake.org/download/) 3.13 or higher and other build dependencies:+- [CMake](https://cmake.org/download/) 3.26 or higher and other build dependencies:```sh% brew install cmake scons fdupes git-lfs ninja```diff --git a/docs/dev/build_mac_intel_cpu.md b/docs/dev/build_mac_intel_cpu.mdindex 7a2d6f83cf8..6a11a8e8b74 100644--- a/docs/dev/build_mac_intel_cpu.md+++ b/docs/dev/build_mac_intel_cpu.md@@ -20,7 +20,7 @@ The software was validated on:% brew install [email protected]```- **arm64** Select universal2 installer from [Python releases](https://www.python.org/downloads/macos/) download page and install `python-3.X.Y-macos11.pkg` image. This allows to have universal python libraries of OpenVINO Python API (build x86_64) .-- [CMake](https://cmake.org/download/) 3.13 or higher and other development tools:+- [CMake](https://cmake.org/download/) 3.26 or higher and other development tools:```sh% brew install cmake scons fdupes git-lfs ninja```diff --git a/docs/dev/build_riscv64.md b/docs/dev/build_riscv64.mdindex 95266ba2ce0..35d74fc64db 100644--- a/docs/dev/build_riscv64.md+++ b/docs/dev/build_riscv64.md@@ -12,7 +12,7 @@ The software was validated on the following devices:## Software requirements-- [CMake](https://cmake.org/download/) 3.13 or higher+- [CMake](https://cmake.org/download/) 3.26 or higher- GCC 7.5 or higher (for non-RVV) / [riscv-gnu-toolchain](https://github.com/riscv-collab/riscv-gnu-toolchain.git) (for RVV)- Python 3.10 for OpenVINO Runtime Python APIdiff --git a/docs/dev/build_windows.md b/docs/dev/build_windows.mdindex b0d1073d330..e43aaf179ff 100644--- a/docs/dev/build_windows.md+++ b/docs/dev/build_windows.md@@ -8,7 +8,7 @@ Supported configurations:## Software requirements-- [CMake](https://cmake.org/download/) 3.13 or higher+- [CMake](https://cmake.org/download/) 3.26 or higher- Microsoft Visual Studio 2019 or higher, version 16.3 or later> **NOTE**: Native Microsoft Visual Studio for WoA has been available since version 3.11.- Python 3.10 - 3.14 for OpenVINO Runtime Python APIdiff --git a/docs/dev/static_libaries.md b/docs/dev/static_libaries.mdindex a73363282d6..72d5b19b4f1 100644--- a/docs/dev/static_libaries.md+++ b/docs/dev/static_libaries.md@@ -19,7 +19,7 @@ It is possible because not all interface symbols of OpenVINO Runtime libraries a## System requirements-* CMake version 3.18 or higher must be used to build static OpenVINO libraries.+* CMake version 3.26 or higher must be used to build static OpenVINO libraries.* Supported OSes:* Windows x64* Linux x64diff --git a/install_build_dependencies.sh b/install_build_dependencies.shindex 9cf0cdadc1e..bb6097f2dc2 100755--- a/install_build_dependencies.sh+++ b/install_build_dependencies.sh@@ -343,7 +343,7 @@ elseecho "Unknown OS, please install build dependencies manually"fi-# cmake 3.20.0 or higher is required to build OpenVINO+# cmake 3.26.0 or higher is required to build OpenVINOif command -v cmake &> /dev/null; thencmake_command=cmake@@ -352,9 +352,9 @@ elif command -v cmake3 &> /dev/null; thenficurrent_cmake_ver=$($cmake_command --version | sed -ne 's/[^0-9]*\(\([0-9]\.\)\{0,4\}[0-9][^.]\).*/\1/p')-required_cmake_ver=3.24.0+required_cmake_ver=3.26.0+cmake_install_ver=3.26.4if [ ! "$(printf '%s\n' "$required_cmake_ver" "$current_cmake_ver" | sort -V | head -n1)" = "$required_cmake_ver" ]; then- installed_cmake_ver=3.26.0arch=$(uname -m)if command -v apt-get &> /dev/null; then@@ -365,8 +365,8 @@ if [ ! "$(printf '%s\n' "$required_cmake_ver" "$current_cmake_ver" | sort -V | hzypper in -y wgetfi- cmake_install_bin="cmake-${installed_cmake_ver}-linux-${arch}.sh"- github_cmake_release="https://github.com/Kitware/CMake/releases/download/v${installed_cmake_ver}/${cmake_install_bin}"+ cmake_install_bin="cmake-${cmake_install_ver}-linux-${arch}.sh"+ github_cmake_release="https://github.com/Kitware/CMake/releases/download/v${cmake_install_ver}/${cmake_install_bin}"wget "${github_cmake_release}" -O "${cmake_install_bin}"chmod +x "${cmake_install_bin}""./${cmake_install_bin}" --skip-license --prefix=/usr/local