Skip to content

Update minimum required version of CMake; use CMake tooling to download dependencies #14196

Open

Description

@kevinushey

Currently, the majority of our dependencies are installed and managed by hand via scripts in the dependencies folder. This does imply some maintenance burden, since we need to manually update and adapt these build scripts as new versions of these dependencies are released and used.

Nowadays, CMake provides a lot of tooling for installing and using external dependencies, via the ExternalProject and FetchContent modules. We made the switch to this for yaml-cpp on some platforms, and this allowed us to eliminate our (bespoke) installer scripts on all platforms. It'd be nice to do this for other platforms as well.

Activity

  1. added
    tech debt
    on Jan 31, 2024
  2. gtritchie commented on Jan 31, 2024

    @gtritchie
    Member

    We're in pretty good shape with cmake. Our linux builders have version 3.25.2:

    if ((${version_array[0]} < 3)) ||
    ( ((${version_array[0]} == 3)) && ((${version_array[1]} < 25)) ) ||
    ( ((${version_array[0]} == 3)) && ((${version_array[1]} == 25)) && ((${version_array[2]} < 2)) ); then
    install_cmake=true
    fi
    fi
    if $install_cmake ; then
    CMAKE_VERSION=cmake-3.25.2
    CMAKE_TARBALL=$CMAKE_VERSION.tar.gz
    wget http://www.cmake.org/files/v3.25/$CMAKE_TARBALL

    Windows has the latest & greatest (at least, whichever version was available when the docker image was created):

    RUN choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=""System""' --fail-on-error-output; `

    Mac has whatever we've installed by hand, presumably reasonably current.

  3. gtritchie commented on Jan 31, 2024

    @gtritchie
    Member

    We do have an assortment of minimums set in the CMakefiles themselves:

    cmake_minimum_required(VERSION 3.6.3)
    cmake_minimum_required(VERSION 3.19)
    cmake_minimum_required(VERSION 3.1...3.18)

  4. added this to the Tech Debt milestone on Feb 12, 2024
  5. Fredo-XVII commented on Jul 22, 2024

    @Fredo-XVII

    Hello!

    I was about to create an issue, but I think maybe it can be added to this ticket.

    (EDIT): Actually, should have its own issue so I moved it to #14994.

  6. kevinushey commented on Jul 23, 2024

    @kevinushey
    CollaboratorAuthor

    Fixed in #14994; thanks for reporting @Fredo-XVII!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementtech debt

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions