Commit 5060ca6a authored by Anas Nashif's avatar Anas Nashif
Browse files

cmake: increase minimal required version to 3.13.1



Move to latest cmake version with many bug fixes and enhancements.

Signed-off-by: default avatarAnas Nashif <anas.nashif@intel.com>
Signed-off-by: default avatarCarles Cufi <carles.cufi@nordicsemi.no>
parent b29a7940
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -10,7 +10,11 @@
# Omitting it is permitted, but doing so incurs a maintenance cost as
# the application must manage upstream changes to this file.

# CMake version 3.8.2 is the real minimum supported version.
# app is a CMake library containing all the application code and is
# modified by the entry point ${APPLICATION_SOURCE_DIR}/CMakeLists.txt
# that was specified when cmake was called.

# CMake version 3.13.1 is the real minimum supported version.
#
# Unfortunately CMake requires the toplevel CMakeLists.txt file to
# define the required version, not even invoking it from an included
@@ -19,7 +23,7 @@
#
# Under these restraints we use a second 'cmake_minimum_required'
# invocation in every toplevel CMakeLists.txt.
cmake_minimum_required(VERSION 3.8.2)
cmake_minimum_required(VERSION 3.13.1)

# CMP0002: "Logical target names must be globally unique"
cmake_policy(SET CMP0002 NEW)
+1 −1
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.8.2)
cmake_minimum_required(VERSION 3.13.1)
project(Zephyr-Kernel-Doc VERSION ${PROJECT_VERSION} LANGUAGES)

set(ZEPHYR_BASE $ENV{ZEPHYR_BASE})
+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ Follow these steps to create a new application directory. (Refer to
   .. code-block:: cmake

      # Boilerplate code, which pulls in the Zephyr build system.
      cmake_minimum_required(VERSION 3.8.2)
      cmake_minimum_required(VERSION 3.13.1)
      include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
      project(my_zephyr_app)

+34 −9
Original line number Diff line number Diff line
@@ -102,16 +102,40 @@ On Arch:
   sudo pacman -S git cmake ninja gperf ccache dfu-util dtc wget \
       python-pip python-setuptools python-wheel xz file make

CMake version 3.8.2 or higher is required. Check what version you have using
``cmake --version``; if you have an older version, check the backports or
install a more recent version manually. For example, to install version
3.8.2 from the CMake website directly in ~/cmake::
.. important::
   Zephyr requires a recent version of CMake. Read through
   the rest of the section below to verify the version you have
   installed is recent enough to build Zephyr.

CMake version 3.13.1 or higher is required. Check what version you have by using
``cmake --version``. If you have an older version, there are several ways
of obtaining a more recent one:

* Use ``pip``:

  .. code-block:: console

     pip3 install --user cmake

   mkdir $HOME/cmake && cd $HOME/cmake
   wget https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh
   yes | sh cmake-3.8.2-Linux-x86_64.sh | cat
   echo "export PATH=$PWD/cmake-3.8.2-Linux-x86_64/bin:\$PATH" >> $HOME/.zephyrrc
   cmake --version
* Download and install from the pre-built binaries provided by the CMake
  project itself in the `CMake Downloads`_ page.
  For example, to install version 3.13.1 in :file:`~/bin/cmake`:

  .. code-block:: console

     mkdir $HOME/bin/cmake && cd $HOME/bin/cmake
     wget https://github.com/Kitware/CMake/releases/download/v3.13.1/cmake-3.13.1-Linux-x86_64.sh
     yes | sh cmake-3.13.1-Linux-x86_64.sh | cat
     echo "export PATH=$PWD/cmake-3.13.1-Linux-x86_64/bin:\$PATH" >> $HOME/.zephyrrc

* Check your distribution's beta or unstable release package library for an
  update.

.. note::
   If you have installed a recent version of CMake using one of the approaches
   listed above, you might want to uninstall the one provided by your
   distribution's package manager (``apt``, ``dnf``, ``swupd``, ``pacman``,
   etc.) in order to avoid version conflicts.

.. _zephyr_sdk:

@@ -207,3 +231,4 @@ To make sure this variable is unset, run:
   unset ZEPHYR_SDK_INSTALL_DIR

.. _Zephyr Downloads: https://www.zephyrproject.org/developers/#downloads
.. _CMake Downloads: https://cmake.org/download
+1 −1
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.8.2)
cmake_minimum_required(VERSION 3.13.1)

include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(test_relocation)
Loading