Toolchain using old CMake version (3.20)

Hello,

I've encountered a problem with the nRF Connect SDK installing and using an old version of CMake, specifically 3.20.

I've learning how to use nRF Connect SDK and BLE from the Nordic Developer Academy. I am using VS Code and work on Windows. In the excercises everything worked well, however when I tried using it in my actual project I found out that the CMake version is too low.

I included a library as a Git submodule, and when I tried to build the project I got the error: CMake Error at yup/CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.24 or higher is required.  You are running version 3.20.5

I have CMake 3.28 installed on my PC, but I haven't been able to figure out how to make nRF Connect switch from the old 3.20 version installed in the toolchain to the new 3.28 version.

Can you please help me with this? Is there a way to switch to a newer CMake verson, or do I have to use the 3.20?

  • Hi,

    Just wanted to let you know that I have seen your case, but that I haven't had the time to look into this yet. Apologies for the wait! I'll try to get you an answer as soon as I can.

    Best regards,

    Raoul

  • Hi again,

    First of all, I have the NCS v.2.5.0 toolchain installed and my CMake version is listed as 3.20.5 as well, so I can confirm that your setup is fine.

    If I understood correctly, all your NCS samples are building fine - it's just the third party module you're including, right?

    As you might know, the required version is set manually through "cmake_minimum_required" at the top of a CMakeLists.txt file. Depending on the CMake features used, the script might not actually require that version as a minimum. You could try lowering the required version to 3.20.5 - if your application builds and runs as you expect, then someone probably just set that requirement too strictly.

    Best regards,

    Raoul

Related